pub struct NativeConnector { /* private fields */ }Expand description
Connector for native ws and wss WebSocket endpoints.
Implementations§
Source§impl NativeConnector
impl NativeConnector
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 header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
Adds an HTTP header to the WebSocket upgrade request.
Sourcepub fn options(self, options: NativeTransportOptions) -> Self
pub fn options(self, options: NativeTransportOptions) -> Self
Replaces the native transport options.
Trait Implementations§
Source§impl Clone for NativeConnector
impl Clone for NativeConnector
Source§fn clone(&self) -> NativeConnector
fn clone(&self) -> NativeConnector
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 NativeConnector
impl Connector for NativeConnector
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 NativeConnector
impl !RefUnwindSafe for NativeConnector
impl !Send for NativeConnector
impl !Sync for NativeConnector
impl Unpin for NativeConnector
impl UnsafeUnpin for NativeConnector
impl !UnwindSafe for NativeConnector
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