pub struct Http2RstStreamBuilder<'a> { /* private fields */ }Expand description
Builds a typed HTTP/2 RST_STREAM frame in caller-owned storage.
Implementations§
Source§impl<'a> Http2RstStreamBuilder<'a>
impl<'a> Http2RstStreamBuilder<'a>
Sourcepub fn new(
buffer: &'a mut [u8],
stream_id: Http2StreamId,
flags: u8,
error_code: Http2ErrorCode,
) -> Self
pub fn new( buffer: &'a mut [u8], stream_id: Http2StreamId, flags: u8, error_code: Http2ErrorCode, ) -> Self
Creates a builder for an exact four-byte error code.
Sourcepub fn build(self) -> Result<Http2RstStream<'a>, Http2BuildError>
pub fn build(self) -> Result<Http2RstStream<'a>, Http2BuildError>
Builds the frame after validating its fixed payload and caller buffer.
Sourcepub fn build_with_maximum(
self,
maximum_payload: usize,
) -> Result<Http2RstStream<'a>, Http2BuildError>
pub fn build_with_maximum( self, maximum_payload: usize, ) -> Result<Http2RstStream<'a>, Http2BuildError>
Builds the frame after validating the caller-provided payload maximum and capacity.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Http2RstStreamBuilder<'a>
impl<'a> Freeze for Http2RstStreamBuilder<'a>
impl<'a> RefUnwindSafe for Http2RstStreamBuilder<'a>
impl<'a> Send for Http2RstStreamBuilder<'a>
impl<'a> Sync for Http2RstStreamBuilder<'a>
impl<'a> Unpin for Http2RstStreamBuilder<'a>
impl<'a> UnsafeUnpin for Http2RstStreamBuilder<'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