Trait sod::AsyncService
source · pub trait AsyncService: Send + Sync {
type Input: Send + 'static;
type Output: Send + 'static;
type Error: Send + 'static;
// Required method
fn process<'life0, 'async_trait>(
&'life0 self,
input: Self::Input
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
An async service trait
Uses the async_trait to accept &self
and an input asynchronously, producing a Result<Self::Output, Self::Error>