pub trait UnreliableDrain: Send {
type CustomErr: Debug + Send;
type DataFormat;
// Required method
fn send<'life0, 'async_trait>(
&'life0 mut self,
data: Self::DataFormat,
) -> Pin<Box<dyn Future<Output = Result<(), ProtocolError<Self::CustomErr>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
This crate makes use of UnreliableDrains, they are expected to provide the
same guarantees like their IO-counterpart. E.g. ordered messages for TCP and
nothing for UDP. The respective Protocol needs then to handle this.
This trait is an abstraction above multiple Drains, e.g. tokio
async-std
std
or even async-channel