pub trait WireRx {
type Error: AsWireRxErrorKind;
// Required method
async fn receive<'a>(
&mut self,
buf: &'a mut [u8],
) -> Result<&'a mut [u8], Self::Error>;
}
Expand description
This trait defines how to receive a single frame from a client
Required Associated Types§
Sourcetype Error: AsWireRxErrorKind
type Error: AsWireRxErrorKind
The error type of this connection.
For simple cases, you can use WireRxErrorKind
directly. You can also
use your own custom type that implements AsWireRxErrorKind
.
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.