pub struct Frame {
pub frame_type: FrameType,
pub flags: u8,
pub stream_id: u64,
pub payload: Vec<u8>,
}Fields§
§frame_type: FrameType§flags: u8§stream_id: u64§payload: Vec<u8>Implementations§
Source§impl Frame
impl Frame
pub fn new( frame_type: FrameType, stream_id: u64, payload: impl Into<Vec<u8>>, ) -> Self
pub fn with_flags( frame_type: FrameType, flags: u8, stream_id: u64, payload: impl Into<Vec<u8>>, ) -> Self
pub fn code(&self) -> u8
pub fn as_view(&self) -> FrameView<'_>
pub fn marshal(&self) -> Result<Vec<u8>>
pub fn encoded_len(&self) -> Result<usize>
pub fn append_to(&self, out: &mut Vec<u8>) -> Result<()>
pub fn parse(src: &[u8], limits: Limits) -> Result<(Self, usize)>
pub fn validate(&self, limits: Limits, inbound: bool) -> Result<()>
Trait Implementations§
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 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