Struct terminus_store::store::StoreLayerBuilder [−][src]
A wrapper over a SimpleLayerBuilder, providing a thread-safe sharable interface.
The SimpleLayerBuilder requires one to have a mutable reference to the underlying LayerBuilder, 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 StoreLayerBuilder
[src]
pub fn name(&self) -> [u32; 5]
[src]
Returns the name of the layer being built.
pub fn parent(&self) -> Option<Arc<dyn Layer>>
[src]
Returns the parent layer this builder is building on top of, if any.
If there's no parent, this returns None.
pub fn add_string_triple(&self, triple: StringTriple) -> Result<(), Error>
[src]
Add a string triple.
pub fn add_id_triple(&self, triple: IdTriple) -> Result<(), Error>
[src]
Add an id triple.
pub fn remove_string_triple(&self, triple: StringTriple) -> Result<(), Error>
[src]
Remove a string triple.
pub fn remove_id_triple(&self, triple: IdTriple) -> Result<(), Error>
[src]
Remove an id triple.
pub fn committed(&self) -> bool
[src]
Returns true if this layer has been committed, and false otherwise.
pub async fn commit_no_load(&self) -> Result<()>
[src]
Commit the layer to storage without loading the resulting layer.
pub async fn commit(&self) -> Result<StoreLayer>
[src]
Commit the layer to storage.
pub async fn apply_delta(&self, delta: &StoreLayer) -> Result<(), Error>
[src]
Apply all triples added and removed by a layer to this builder.
This is a way to 'cherry-pick' a layer on top of another layer, without caring about its history.
pub fn apply_diff(&self, other: &StoreLayer) -> Result<(), Error>
[src]
Apply the changes required to change our parent layer into the given layer.
Auto Trait Implementations
impl !RefUnwindSafe for StoreLayerBuilder
[src]
impl Send for StoreLayerBuilder
[src]
impl Sync for StoreLayerBuilder
[src]
impl Unpin for StoreLayerBuilder
[src]
impl !UnwindSafe for StoreLayerBuilder
[src]
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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.
pub 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>,