pub struct FramedH2 { /* private fields */ }Expand description
A simple framed HTTP/2 I/O wrapper.
Implementations§
Source§impl FramedH2
impl FramedH2
pub fn new(stream: TcpStream, buffered: Vec<u8>) -> Self
Sourcepub async fn read_frame(
&mut self,
max_frame_size: u32,
) -> Result<Frame, Http2Error>
pub async fn read_frame( &mut self, max_frame_size: u32, ) -> Result<Frame, Http2Error>
Read the next HTTP/2 frame.
Sourcepub async fn write_frame(
&mut self,
frame_type: FrameType,
flags: u8,
stream_id: u32,
payload: &[u8],
) -> Result<(), Http2Error>
pub async fn write_frame( &mut self, frame_type: FrameType, flags: u8, stream_id: u32, payload: &[u8], ) -> Result<(), Http2Error>
Write an HTTP/2 frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FramedH2
impl RefUnwindSafe for FramedH2
impl Send for FramedH2
impl Sync for FramedH2
impl Unpin for FramedH2
impl UnwindSafe for FramedH2
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).