pub trait AsyncReadRecvStreamExtra: Send {
// Required methods
fn inner(&mut self) -> &mut (impl AsyncRead + Unpin + Send);
fn stop(&mut self, code: VarInt) -> Result<()>;
fn id(&self) -> u64;
}
Expand description
This is a helper trait to work with AsyncReadRecvStream
. If you have an
AsyncRead + Unpin + Send
, you can implement these additional methods and wrap the result
in an AsyncReadRecvStream
to get a RecvStream
that reads from the underlying AsyncRead
.
Required Methods§
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.