pub trait Service<In>: Send + Sync {
type Out;
// Required method
fn execute(&self, input: In) -> impl Future<Output = Self::Out> + Send;
}Expand description
An async operation from In to Out.
Implement this trait for a custom service. Use Execute to wrap a
function or closure.
See the crate documentation for examples and layer composition.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".