Trait SendStreamUnframed

Source
pub trait SendStreamUnframed<B>: SendStream<B>
where B: Buf,
{ // Required method fn poll_send<D>( &mut self, cx: &mut Context<'_>, buf: &mut D, ) -> Poll<Result<usize, StreamErrorIncoming>> where D: Buf; }
Available on crate feature h3 only.
Expand description

Allows sending unframed pure bytes to a stream. Similar to AsyncWrite

Required Methods§

Source

fn poll_send<D>( &mut self, cx: &mut Context<'_>, buf: &mut D, ) -> Poll<Result<usize, StreamErrorIncoming>>
where D: Buf,

Attempts to write data into the stream.

Returns the number of bytes written.

buf is advanced by the number of bytes written.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<B> SendStreamUnframed<B> for BidiStream<B>
where B: Buf,

Source§

impl<B> SendStreamUnframed<B> for SendStream<B>
where B: Buf,

Source§

impl<S, B> SendStreamUnframed<B> for BufRecvStream<S, B>
where B: Buf, S: SendStreamUnframed<B>,