pub struct WebConnector { /* private fields */ }Expand description
Browser connector with optional Phoenix LongPoll fallback.
Implementations§
Source§impl WebConnector
impl WebConnector
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a connector for an already-resolved WebSocket URL.
Sourcepub fn from_endpoint(endpoint: Endpoint) -> Self
pub fn from_endpoint(endpoint: Endpoint) -> Self
Creates a connector that resolves a Phoenix endpoint each attempt.
Sourcepub fn long_poll_fallback(self, after: Duration) -> Self
pub fn long_poll_fallback(self, after: Duration) -> Self
Enables LongPoll fallback after this WebSocket open or health deadline.
Sourcepub fn long_poll_timeout(self, timeout: Duration) -> Self
pub fn long_poll_timeout(self, timeout: Duration) -> Self
Sets the timeout applied to each fallback LongPoll request.
Trait Implementations§
Source§impl Clone for WebConnector
impl Clone for WebConnector
Source§fn clone(&self) -> WebConnector
fn clone(&self) -> WebConnector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Connector for WebConnector
impl Connector for WebConnector
Source§fn connect(
&self,
context: ConnectContext,
) -> LocalBoxFuture<'static, Result<Box<dyn Transport>, TransportError>>
fn connect( &self, context: ConnectContext, ) -> LocalBoxFuture<'static, Result<Box<dyn Transport>, TransportError>>
Starts one transport connection attempt.
Auto Trait Implementations§
impl Freeze for WebConnector
impl !RefUnwindSafe for WebConnector
impl !Send for WebConnector
impl !Sync for WebConnector
impl Unpin for WebConnector
impl UnsafeUnpin for WebConnector
impl !UnwindSafe for WebConnector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more