pub struct WsLayer<C> {
url: Option<String>,
codec: C,
}Expand description
WebSocket layer. Upgrades a byte stream to a WsConn.
Takes a Codec<Message> to encode/decode WS messages directly.
Fields§
§url: Option<String>§codec: CImplementations§
Trait Implementations§
Source§impl<C> ClientLayer<Box<dyn ByteStream>, WsConn<C>> for WsLayer<C>
impl<C> ClientLayer<Box<dyn ByteStream>, WsConn<C>> for WsLayer<C>
Auto Trait Implementations§
impl<C> Freeze for WsLayer<C>where
C: Freeze,
impl<C> RefUnwindSafe for WsLayer<C>where
C: RefUnwindSafe,
impl<C> Send for WsLayer<C>where
C: Send,
impl<C> Sync for WsLayer<C>where
C: Sync,
impl<C> Unpin for WsLayer<C>where
C: Unpin,
impl<C> UnsafeUnpin for WsLayer<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for WsLayer<C>where
C: UnwindSafe,
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