pub type StreamBiLocalH3 = Stream<BiLocal, H3>;Expand description
HTTP3 bidirectional local stream.
Aliased Type§
pub struct StreamBiLocalH3 { /* private fields */ }Implementations§
Source§impl StreamBiLocalH3
impl StreamBiLocalH3
Sourcepub fn read_frame<'a, R>(
&self,
bytes_reader: &mut R,
) -> Result<Option<Frame<'a>>, ErrorCode>where
R: BytesReader<'a>,
pub fn read_frame<'a, R>(
&self,
bytes_reader: &mut R,
) -> Result<Option<Frame<'a>>, ErrorCode>where
R: BytesReader<'a>,
See Frame::read.
Sourcepub async fn read_frame_async<'a, R>(
&self,
reader: &mut R,
) -> Result<Frame<'a>, IoReadError>
pub async fn read_frame_async<'a, R>( &self, reader: &mut R, ) -> Result<Frame<'a>, IoReadError>
See Frame::read_async.
Sourcepub fn read_frame_from_buffer<'a>(
&self,
buffer_reader: &mut BufferReader<'a>,
) -> Result<Option<Frame<'a>>, ErrorCode>
pub fn read_frame_from_buffer<'a>( &self, buffer_reader: &mut BufferReader<'a>, ) -> Result<Option<Frame<'a>>, ErrorCode>
Sourcepub fn write_frame<W>(
&mut self,
frame: Frame<'_>,
bytes_writer: &mut W,
) -> Result<(), EndOfBuffer>where
W: BytesWriter,
pub fn write_frame<W>(
&mut self,
frame: Frame<'_>,
bytes_writer: &mut W,
) -> Result<(), EndOfBuffer>where
W: BytesWriter,
Sourcepub async fn write_frame_async<W>(
&mut self,
frame: Frame<'_>,
writer: &mut W,
) -> Result<(), IoWriteError>
pub async fn write_frame_async<W>( &mut self, frame: Frame<'_>, writer: &mut W, ) -> Result<(), IoWriteError>
Sourcepub fn write_frame_to_buffer(
&mut self,
frame: Frame<'_>,
buffer_writer: &mut BufferWriter<'_>,
) -> Result<(), EndOfBuffer>
pub fn write_frame_to_buffer( &mut self, frame: Frame<'_>, buffer_writer: &mut BufferWriter<'_>, ) -> Result<(), EndOfBuffer>
Sourcepub fn upgrade<W>(
self,
session_id: SessionId,
bytes_writer: &mut W,
) -> StreamBiLocalWTwhere
W: BytesWriter,
pub fn upgrade<W>(
self,
session_id: SessionId,
bytes_writer: &mut W,
) -> StreamBiLocalWTwhere
W: BytesWriter,
Upgrades to a WebTransport stream.
§Panics
- Panics if any other I/O operation has been performed on this stream before upgrade.
- Panics if
bytes_writerdoes not have enough capacity. SeeSelf::upgrade_size.
Sourcepub async fn upgrade_async<W>(
self,
session_id: SessionId,
writer: &mut W,
) -> Result<StreamBiLocalWT, IoWriteError>
pub async fn upgrade_async<W>( self, session_id: SessionId, writer: &mut W, ) -> Result<StreamBiLocalWT, IoWriteError>
Upgrades to a WebTransport stream.
§Panics
- Panics if any other I/O operation has been performed on this stream before upgrade.
Sourcepub fn upgrade_size(&self, session_id: SessionId) -> usize
pub fn upgrade_size(&self, session_id: SessionId) -> usize
Returns the needed capacity for upgrade via Self::upgrade.
Sourcepub fn into_session(self, session_request: SessionRequest) -> StreamSession
pub fn into_session(self, session_request: SessionRequest) -> StreamSession
Converts the stream into a StreamSession.