pub struct Frame { /* private fields */ }Expand description
The base message type is frame
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new_window_update(flags: Flags, stream_id: u32, delta: u32) -> Frame
pub fn new_window_update(flags: Flags, stream_id: u32, delta: u32) -> Frame
Create a window update frame
Sourcepub fn new_go_away(reason: GoAwayCode) -> Frame
pub fn new_go_away(reason: GoAwayCode) -> Frame
Create a go away frame
Sourcepub fn length(&self) -> u32
pub fn length(&self) -> u32
The length field of current body or some other things such as ping_id/go away code/delta
Sourcepub fn into_parts(self) -> (Header, Option<BytesMut>)
pub fn into_parts(self) -> (Header, Option<BytesMut>)
Consume current frame split into header and body
Trait Implementations§
Source§impl Encoder<Frame> for FrameCodec
impl Encoder<Frame> for FrameCodec
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin 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