StreamUniRemoteH3

Type Alias StreamUniRemoteH3 

Source
pub type StreamUniRemoteH3 = Stream<UniRemote, H3>;
Expand description

HTTP3 unidirectional remote stream.

Aliased Type§

pub struct StreamUniRemoteH3 { /* private fields */ }

Implementations§

Source§

impl StreamUniRemoteH3

Source

pub fn read_frame<'a, R>( &mut self, bytes_reader: &mut R, ) -> Result<Option<Frame<'a>>, ErrorCode>
where R: BytesReader<'a>,

See Frame::read.

§Panics

Panics if the stream kind is StreamKind::WebTransport. In that case, use upgrade method.

Source

pub async fn read_frame_async<'a, R>( &mut self, reader: &mut R, ) -> Result<Frame<'a>, IoReadError>
where R: AsyncRead + Unpin + ?Sized,

See Frame::read_async.

§Panics

Panics if the stream kind is StreamKind::WebTransport. In that case, use upgrade method.

Source

pub fn read_frame_from_buffer<'a>( &mut self, buffer_reader: &mut BufferReader<'a>, ) -> Result<Option<Frame<'a>>, ErrorCode>

See Frame::read_from_buffer.

§Panics

Panics if the stream kind is StreamKind::WebTransport. In that case, use upgrade method.

Source

pub fn upgrade(self) -> StreamUniRemoteWT

Upgrades to a WebTransport stream.

§Panics

Panics if the stream kind is not StreamKind::WebTransport.

Source

pub fn kind(&self) -> StreamKind

Returns the StreamKind associated with the stream.

Source

pub fn session_id(&self) -> Option<SessionId>

Returns the SessionId if stream is StreamKind::WebTransport, otherwise returns None.