pub struct LongPollConnector { /* private fields */ }Expand description
Browser connector that always uses Phoenix LongPoll.
Implementations§
Source§impl LongPollConnector
impl LongPollConnector
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a LongPoll connector from an already-resolved endpoint URL.
Sourcepub fn from_endpoint(endpoint: Endpoint) -> Self
pub fn from_endpoint(endpoint: Endpoint) -> Self
Creates a LongPoll connector that resolves a Phoenix endpoint each attempt.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sets the timeout applied to every LongPoll request.
Trait Implementations§
Source§impl Clone for LongPollConnector
impl Clone for LongPollConnector
Source§fn clone(&self) -> LongPollConnector
fn clone(&self) -> LongPollConnector
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 LongPollConnector
impl Connector for LongPollConnector
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 LongPollConnector
impl !RefUnwindSafe for LongPollConnector
impl !Send for LongPollConnector
impl !Sync for LongPollConnector
impl Unpin for LongPollConnector
impl UnsafeUnpin for LongPollConnector
impl !UnwindSafe for LongPollConnector
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