Skip to main content

BulkCapableService

Trait BulkCapableService 

Source
pub trait BulkCapableService<E: Send + Sync + 'static, DTO: Send + Sync + 'static>: Send + Sync {
    // Required methods
    fn create_one<'life0, 'async_trait>(
        &'life0 self,
        dto: DTO,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_one<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The minimal contract needed from a service to power bulk operations.

Required Methods§

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§