pub struct FrameHead {
pub fin: bool,
pub opcode: WsOpcode,
pub mask: [u8; 4],
pub payload_len: u64,
}
Fields
fin: bool
opcode: WsOpcode
mask: [u8; 4]
payload_len: u64
Implementations
sourceimpl FrameHead
impl FrameHead
pub fn decode<T: AsyncRead + Unpin>(transport: T) -> FrameHeadDecode<T>ⓘNotable traits for FrameHeadDecode<T>impl<T: AsyncRead + Unpin> Future for FrameHeadDecode<T> type Output = Result<(T, FrameHead), FrameDecodeError>;
pub fn parse(buffer: &[u8]) -> Result<FrameHead, FrameHeadParseError>
pub fn len_bytes(&self) -> usize
pub fn masked(&self) -> bool
pub fn encode(&self, buffer: &mut [u8])
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FrameHead
impl Send for FrameHead
impl Sync for FrameHead
impl Unpin for FrameHead
impl UnwindSafe for FrameHead
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