Trait Service

Source
pub trait Service: Send + Sync {
    // Required method
    fn name(&self) -> &str;

    // Provided method
    fn validate<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Base service trait

Required Methods§

Source

fn name(&self) -> &str

Service name for identification

Provided Methods§

Source

fn validate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate business rules

Implementors§