pub struct Http2RstStream<'a> { /* private fields */ }Expand description
A validated borrowed HTTP/2 RST_STREAM frame.
Implementations§
Source§impl<'a> Http2RstStream<'a>
impl<'a> Http2RstStream<'a>
Sourcepub fn parse(
bytes: &'a [u8],
maximum_payload: usize,
) -> Result<Self, Http2ParseError>
pub fn parse( bytes: &'a [u8], maximum_payload: usize, ) -> Result<Self, Http2ParseError>
Parses the first complete RST_STREAM frame, enforcing the caller-provided payload maximum.
Sourcepub fn from_frame(frame: Http2Frame<'a>) -> Result<Self, Http2ParseError>
pub fn from_frame(frame: Http2Frame<'a>) -> Result<Self, Http2ParseError>
Validates a raw RST_STREAM frame’s intrinsic layout.
Sourcepub const fn frame(&self) -> Http2Frame<'a>
pub const fn frame(&self) -> Http2Frame<'a>
Returns the validated raw frame.
Sourcepub const fn error_code(&self) -> Http2ErrorCode
pub const fn error_code(&self) -> Http2ErrorCode
Returns the raw-preserving stream error code.
Trait Implementations§
Source§impl<'a> Clone for Http2RstStream<'a>
impl<'a> Clone for Http2RstStream<'a>
impl<'a> Copy for Http2RstStream<'a>
Source§impl<'a> Debug for Http2RstStream<'a>
impl<'a> Debug for Http2RstStream<'a>
impl<'a> Eq for Http2RstStream<'a>
Source§impl<'a> PartialEq for Http2RstStream<'a>
impl<'a> PartialEq for Http2RstStream<'a>
impl<'a> StructuralPartialEq for Http2RstStream<'a>
Auto Trait Implementations§
impl<'a> Freeze for Http2RstStream<'a>
impl<'a> RefUnwindSafe for Http2RstStream<'a>
impl<'a> Send for Http2RstStream<'a>
impl<'a> Sync for Http2RstStream<'a>
impl<'a> Unpin for Http2RstStream<'a>
impl<'a> UnsafeUnpin for Http2RstStream<'a>
impl<'a> UnwindSafe for Http2RstStream<'a>
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