[][src]Trait terminus_store::layer::LayerBuilder

pub trait LayerBuilder: Send + Sync {
    fn name(&self) -> [u32; 5];
fn add_string_triple(&mut self, triple: &StringTriple);
fn add_id_triple(&mut self, triple: IdTriple) -> bool;
fn remove_string_triple(&mut self, triple: &StringTriple) -> bool;
fn remove_id_triple(&mut self, triple: IdTriple) -> bool;
fn commit(self) -> Box<dyn Future<Item = (), Error = Error> + Send>;
fn commit_boxed(
        self: Box<Self>
    ) -> Box<dyn Future<Item = (), Error = Error> + Send>; }

A layer builder trait with no generic typing.

Lack of generic types allows layer builders with different storage backends to be handled by trait objects of this type.

Required methods

fn name(&self) -> [u32; 5]

Returns the name of the layer being built

fn add_string_triple(&mut self, triple: &StringTriple)

Add a string triple

fn add_id_triple(&mut self, triple: IdTriple) -> bool

Add an id triple

fn remove_string_triple(&mut self, triple: &StringTriple) -> bool

Remove a string triple

fn remove_id_triple(&mut self, triple: IdTriple) -> bool

Remove an id triple

fn commit(self) -> Box<dyn Future<Item = (), Error = Error> + Send>

Commit the layer to storage

fn commit_boxed(
    self: Box<Self>
) -> Box<dyn Future<Item = (), Error = Error> + Send>

Commit a boxed layer to storage

Loading content...

Implementors

impl<F: 'static + FileLoad + FileStore + Clone> LayerBuilder for SimpleLayerBuilder<F>[src]

Loading content...