pub struct TokioSocketFactory { /* private fields */ }Expand description
Opens the client’s sync socket with tokio-tungstenite, on a local task
per socket. Like TokioScheduler, it must be used from inside a
LocalSet.
Implementations§
Trait Implementations§
Source§impl Default for TokioSocketFactory
impl Default for TokioSocketFactory
Source§impl SocketFactory for TokioSocketFactory
impl SocketFactory for TokioSocketFactory
Source§fn open(
&self,
url: &str,
sec_protocol: Option<&str>,
events: Rc<dyn SocketEvents>,
) -> Box<dyn SocketConnection>
fn open( &self, url: &str, sec_protocol: Option<&str>, events: Rc<dyn SocketEvents>, ) -> Box<dyn SocketConnection>
Starts opening a WebSocket to
url, sending sec_protocol (when
set) as the Sec-WebSocket-Protocol header. Events go to events
until the engine closes the socket.Auto Trait Implementations§
impl Forget for TokioSocketFactory
impl Freeze for TokioSocketFactory
impl Move for TokioSocketFactory
impl RefUnwindSafe for TokioSocketFactory
impl Send for TokioSocketFactory
impl Sync for TokioSocketFactory
impl Unpin for TokioSocketFactory
impl UnsafeUnpin for TokioSocketFactory
impl UnwindSafe for TokioSocketFactory
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