Skip to main content

TaskEntityStore

Trait TaskEntityStore 

Source
pub trait TaskEntityStore {
    // Required methods
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
        created: Timestamp,
        updated: Timestamp,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn touch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
        updated: Timestamp,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn meta<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
    ) -> Pin<Box<dyn Future<Output = Option<(Timestamp, Timestamp)>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<Id>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The minimal task entity (spec §7): identity + timestamps only. Everything else is a Component. delete cascades every component of the id.

Required Methods§

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, created: Timestamp, updated: Timestamp, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn touch<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, updated: Timestamp, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Bump updated_at (after a mutation produced events).

Source

fn meta<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Option<(Timestamp, Timestamp)>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

(created_at, updated_at), or None if the id has no entity.

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<Id>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§