pub struct VersionedGraphStore<'a, G: GraphStore> { /* private fields */ }Implementations§
Source§impl<'a, G: GraphStore + Clone> VersionedGraphStore<'a, G>
impl<'a, G: GraphStore + Clone> VersionedGraphStore<'a, G>
pub fn new(base: &'a mut G, graph: impl Into<String>) -> Self
pub fn version(&self) -> u64
pub fn base(&self) -> &G
pub fn base_mut(&mut self) -> &mut G
Sourcepub fn apply(&mut self, delta: GraphDelta) -> GraphStoreResult<u64>
pub fn apply(&mut self, delta: GraphDelta) -> GraphStoreResult<u64>
Apply a delta to the base store, accumulating an inverse delta for rollback. Returns the new version number.
Sourcepub fn rollback(&mut self, to_version: u64) -> GraphStoreResult<()>
pub fn rollback(&mut self, to_version: u64) -> GraphStoreResult<()>
Rewind to the given version by replaying inverse deltas. Errors when the target version is in the future or below zero.
Auto Trait Implementations§
impl<'a, G> !RefUnwindSafe for VersionedGraphStore<'a, G>
impl<'a, G> !UnwindSafe for VersionedGraphStore<'a, G>
impl<'a, G> Freeze for VersionedGraphStore<'a, G>
impl<'a, G> Send for VersionedGraphStore<'a, G>
impl<'a, G> Sync for VersionedGraphStore<'a, G>
impl<'a, G> Unpin for VersionedGraphStore<'a, G>
impl<'a, G> UnsafeUnpin for VersionedGraphStore<'a, G>where
&'a mut G: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more