pub struct FastWsReader<S: AsyncRead + Unpin + Send> { /* private fields */ }Expand description
fastwebsockets read half adapter.
Wraps FragmentCollectorRead<ReadHalf<S>> for safe handling of any
unexpected WS fragmentation (negligible overhead in the common non-
fragmented case: one branch per frame, no allocation).
auto_pong and auto_close are disabled. PING and Close frames are
surfaced as WsMessage::Ping and WsMessage::Close so the mux
reader handles them through the existing command path (SendWsPong,
break loop). Pong, Text, and Continuation frames are absorbed in the
read loop; the mux never sees them.
Implementations§
Source§impl<S: AsyncRead + Unpin + Send> FastWsReader<S>
impl<S: AsyncRead + Unpin + Send> FastWsReader<S>
pub const fn new(ws: FragmentCollectorRead<S>) -> Self
Trait Implementations§
Source§impl<S: AsyncRead + Unpin + Send> WsFrameReader for FastWsReader<S>
impl<S: AsyncRead + Unpin + Send> WsFrameReader for FastWsReader<S>
Auto Trait Implementations§
impl<S> Freeze for FastWsReader<S>where
S: Freeze,
impl<S> RefUnwindSafe for FastWsReader<S>where
S: RefUnwindSafe,
impl<S> Send for FastWsReader<S>
impl<S> Sync for FastWsReader<S>where
S: Sync,
impl<S> Unpin for FastWsReader<S>
impl<S> UnsafeUnpin for FastWsReader<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for FastWsReader<S>where
S: 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