pub trait Handler<I>:
Send
+ Sync
+ 'static {
type Output: Send + Sync + 'static;
// Required method
fn handle(
&self,
input: I,
) -> impl Future<Output = Result<Self::Output>> + Send;
}Expand description
Async domain transformation. Ordinary async functions and closures implement this.
Use Emit<T> as the output with Subscription::new_emitting for 0/1/N output.
Subscriptions accept a handler whose input is the received record or its value,
and whose output is the sink’s type or a plain value; see
IntoHandler.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".