pub trait Handler<T, Req, Res>: Clone{
type Future: Future<Output = Result<Res>> + Send + 'static;
// Required method
fn handle(self, resources: Resources, value: Req) -> Self::Future;
// Provided method
fn into_dyn(self) -> Arc<dyn HandlerWrapperTrait>
where Self: Sized + Send + Sync + 'static { ... }
}
Required Associated Types§
Required Methods§
Provided 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.