pub struct Http2FrameBuilder<'a, 'b> { /* private fields */ }Expand description
Builds a raw HTTP/2 frame in caller-owned storage.
Implementations§
Source§impl<'a, 'b> Http2FrameBuilder<'a, 'b>
impl<'a, 'b> Http2FrameBuilder<'a, 'b>
Sourcepub fn new(
buffer: &'a mut [u8],
frame_type: Http2FrameType,
flags: u8,
stream_id: Http2StreamId,
payload: &'b [u8],
) -> Self
pub fn new( buffer: &'a mut [u8], frame_type: Http2FrameType, flags: u8, stream_id: Http2StreamId, payload: &'b [u8], ) -> Self
Creates a builder that copies the supplied raw payload.
Sourcepub fn build(self) -> Result<Http2FrameMut<'a>, Http2BuildError>
pub fn build(self) -> Result<Http2FrameMut<'a>, Http2BuildError>
Validates HTTP/2’s representable payload length and capacity before writing the frame.
Sourcepub fn build_with_maximum(
self,
maximum_payload: usize,
) -> Result<Http2FrameMut<'a>, Http2BuildError>
pub fn build_with_maximum( self, maximum_payload: usize, ) -> Result<Http2FrameMut<'a>, Http2BuildError>
Validates the caller-provided payload maximum and capacity before writing the frame.
Auto Trait Implementations§
impl<'a, 'b> !UnwindSafe for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> Freeze for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> RefUnwindSafe for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> Send for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> Sync for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> Unpin for Http2FrameBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for Http2FrameBuilder<'a, 'b>
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