Skip to main content

DagAddHeads

Trait DagAddHeads 

Source
pub trait DagAddHeads {
    // Required method
    fn add_heads<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        parents: &'life1 dyn Parents,
        heads: &'life2 VertexListWithOptions,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Add vertexes recursively to the DAG.

Required Methods§

Source

fn add_heads<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, parents: &'life1 dyn Parents, heads: &'life2 VertexListWithOptions, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add non-lazy vertexes and their ancestors in memory.

Does not persist changes to disk. Use add_heads_and_flush to persist. Use import_pull_data to add lazy segments to the DAG.

heads must use non-MASTER (NON_MASTER, VIRTUAL) groups as desired_group. heads are imported in the given order.

MethodAllowed groupsPersistLazy
add_headsNON_MASTER, VIRTUAL [1]NoNo
add_heads_and_flushMASTERYesNo
import_pull_dataMASTERYesYes

[1]: Changes to the VIRTUAL group may not survive reloading. Use set_managed_virtual_group to “pin” content in VIRTUAL that survives reloads.

Implementors§

Source§

impl<IS, M, P, S> DagAddHeads for AbstractDag<IdDag<IS>, M, P, S>
where IS: IdDagStore, IdDag<IS>: TryClone, M: TryClone + IdMapAssignHead + Send + Sync + 'static, P: TryClone + Send + Sync + 'static, S: TryClone + Send + Sync + 'static,