[][src]Struct terminus_store::store::sync::SyncStoreLayerBuilder

pub struct SyncStoreLayerBuilder { /* fields omitted */ }

A wrapper over a SimpleLayerBuilder, providing a thread-safe sharable interface

The SimpleLayerBuilder requires one to have a mutable reference to it, and on commit it will be consumed. This builder only requires an immutable reference, and uses a futures-aware read-write lock to synchronize access to it between threads. Also, rather than consuming itself on commit, this wrapper will simply mark itself as having committed, returning errors on further calls.

Implementations

impl SyncStoreLayerBuilder[src]

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

Returns the name of the layer being built

pub fn add_string_triple(&self, triple: &StringTriple) -> Result<(), Error>[src]

Add a string triple

pub fn add_id_triple(&self, triple: IdTriple) -> Result<bool, Error>[src]

Add an id triple

pub fn remove_string_triple(&self, triple: &StringTriple) -> Result<bool, Error>[src]

Remove a string triple

pub fn remove_id_triple(&self, triple: IdTriple) -> Result<bool, Error>[src]

Remove an id triple

pub fn committed(&self) -> bool[src]

Returns a boolean result which is true if this builder has been committed, and false otherwise.

pub fn commit(&self) -> Result<SyncStoreLayer, Error>[src]

Commit the layer to storage

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,