EventDagExt

Trait EventDagExt 

Source
pub trait EventDagExt: EventDag {
    // Provided methods
    fn append_root<'life0, 'async_trait>(
        &'life0 self,
        payload: Self::Payload,
    ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn append_child<'life0, 'async_trait>(
        &'life0 self,
        parent: EventId,
        payload: Self::Payload,
    ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn fork<'life0, 'async_trait>(
        &'life0 self,
        parent: EventId,
        new_lane: u32,
        payload: Self::Payload,
    ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn depth<'life0, 'async_trait>(
        &'life0 self,
        event_id: EventId,
    ) -> Pin<Box<dyn Future<Output = Effect<u32>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn is_ancestor<'life0, 'async_trait>(
        &'life0 self,
        ancestor: EventId,
        descendant: EventId,
    ) -> Pin<Box<dyn Future<Output = Effect<bool>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Extension trait for EventDag with convenience methods.

Provided Methods§

Source

fn append_root<'life0, 'async_trait>( &'life0 self, payload: Self::Payload, ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Append a new root event.

Source

fn append_child<'life0, 'async_trait>( &'life0 self, parent: EventId, payload: Self::Payload, ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Append a child event to an existing event.

Source

fn fork<'life0, 'async_trait>( &'life0 self, parent: EventId, new_lane: u32, payload: Self::Payload, ) -> Pin<Box<dyn Future<Output = Effect<EventId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fork a new lane from an existing event.

Source

fn depth<'life0, 'async_trait>( &'life0 self, event_id: EventId, ) -> Pin<Box<dyn Future<Output = Effect<u32>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get the depth of an event in the DAG.

Source

fn is_ancestor<'life0, 'async_trait>( &'life0 self, ancestor: EventId, descendant: EventId, ) -> Pin<Box<dyn Future<Output = Effect<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Check if one event is an ancestor of another.

Implementors§