[−][src]Struct terminus_store::store::sync::SyncStoreLayerBuilder
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
impl !RefUnwindSafe for SyncStoreLayerBuilder
impl Send for SyncStoreLayerBuilder
impl Sync for SyncStoreLayerBuilder
impl Unpin for SyncStoreLayerBuilder
impl !UnwindSafe for SyncStoreLayerBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,