pub struct Frame {
pub flags: FrameFlags,
pub timestamp: Option<u64>,
pub payload: Bytes,
}Expand description
A Clasp frame
Fields§
§flags: FrameFlags§timestamp: Option<u64>§payload: BytesImplementations§
Source§impl Frame
impl Frame
Sourcepub fn with_timestamp(self, timestamp: u64) -> Self
pub fn with_timestamp(self, timestamp: u64) -> Self
Create a frame with timestamp
Sourcepub fn with_encrypted(self, encrypted: bool) -> Self
pub fn with_encrypted(self, encrypted: bool) -> Self
Create a frame with encryption flag
Sourcepub fn with_compressed(self, compressed: bool) -> Self
pub fn with_compressed(self, compressed: bool) -> Self
Create a frame with compression flag
Sourcepub fn check_complete(buf: &[u8]) -> Option<usize>
pub fn check_complete(buf: &[u8]) -> Option<usize>
Check if buffer contains a complete frame
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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