pub trait Consumer:
Clone
+ Send
+ 'static {
type Key: Array;
type Value;
type Failure;
// Required methods
fn deliver(
&mut self,
key: Self::Key,
value: Self::Value,
) -> impl Future<Output = bool> + Send;
fn failed(
&mut self,
key: Self::Key,
failure: Self::Failure,
) -> impl Future<Output = ()> + Send;
}
Expand description
Notified when data is available, and must validate it.
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.