pub enum WsFrame {
Control(WsControlFrame),
Data(WsDataFrame),
}
Variants
Control(WsControlFrame)
Data(WsDataFrame)
Implementations
sourceimpl WsFrame
impl WsFrame
pub fn decode<T: AsyncRead + Unpin>(transport: T) -> FrameDecoder<T>ⓘNotable traits for FrameDecoder<T>impl<T: AsyncRead + Unpin> Future for FrameDecoder<T> type Output = Result<(T, WsFrame), FrameDecodeError>;
pub fn encode(
frame_head: FrameHead,
frame_payload: &[u8],
buffer: &mut [u8]
) -> usize
pub fn encode_vec(frame_head: FrameHead, frame_payload: &[u8]) -> Vec<u8>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WsFrame
impl Send for WsFrame
impl Sync for WsFrame
impl Unpin for WsFrame
impl UnwindSafe for WsFrame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more