pub trait WireRx: Send + 'static {
type Error: Error;
// Required method
fn receive(
&mut self,
) -> impl Future<Output = Result<Vec<u8>, Self::Error>> + Send;
}
Expand description
Wire Receive Interface
Responsible for accumulating a serialized frame (including header and payload), performing any further decoding if necessary, and returning to the caller.
All errors are treated as fatal - resolvable or ignorable errors should not be returned to the caller.
Required Associated Types§
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.