pub struct GrowingStore<S> { /* private fields */ }๐Deprecating in a future version: GrowingStore does not implement deletion. Use InMemoryStore which implements deletion of AVL tree nodes.
Expand description
GrowingStore does not prune any path. If the path is set to v, the stored value is v If the path is deleted, the stored value is [] Note: we should not allow empty vec to store as this would conflict with the deletion representation.
Implementationsยง
Sourceยงimpl<S> GrowingStore<S>
impl<S> GrowingStore<S>
Sourceยงimpl<S> GrowingStore<S>where
S: Store,
impl<S> GrowingStore<S>where
S: Store,
pub fn is_deleted(&self, path: &Path) -> bool
pub fn deleted_keys(&self, key_prefix: &Path) -> Vec<Path>
Trait Implementationsยง
Sourceยงimpl<S: Clone> Clone for GrowingStore<S>
impl<S: Clone> Clone for GrowingStore<S>
Sourceยงfn clone(&self) -> GrowingStore<S>
fn clone(&self) -> GrowingStore<S>
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl<S: Debug> Debug for GrowingStore<S>
impl<S: Debug> Debug for GrowingStore<S>
Sourceยงimpl<S> Default for GrowingStore<S>where
S: Default,
impl<S> Default for GrowingStore<S>where
S: Default,
Sourceยงimpl<S> ProvableStore for GrowingStore<S>where
S: ProvableStore,
impl<S> ProvableStore for GrowingStore<S>where
S: ProvableStore,
Sourceยงimpl<S> Store for GrowingStore<S>where
S: Store,
impl<S> Store for GrowingStore<S>where
S: Store,
Sourceยงtype Error = <S as Store>::Error
type Error = <S as Store>::Error
Error type - expected to envelope all possible errors in store
Sourceยงfn set(
&mut self,
path: Path,
value: Vec<u8>,
) -> Result<Option<Vec<u8>>, Self::Error>
fn set( &mut self, path: Path, value: Vec<u8>, ) -> Result<Option<Vec<u8>>, Self::Error>
Set
value for pathSourceยงfn get(&self, height: Height, path: &Path) -> Option<Vec<u8>>
fn get(&self, height: Height, path: &Path) -> Option<Vec<u8>>
Get associated
value for path at specified heightSourceยงfn commit(&mut self) -> Result<Vec<u8>, Self::Error>
fn commit(&mut self) -> Result<Vec<u8>, Self::Error>
Commit
Pending block to canonical chain and create new PendingSourceยงfn prune(&mut self, height: u64) -> Result<u64, Self::Error>
fn prune(&mut self, height: u64) -> Result<u64, Self::Error>
Prune historic blocks upto specified
heightSourceยงfn current_height(&self) -> u64
fn current_height(&self) -> u64
Return the current height of the chain
Auto Trait Implementationsยง
impl<S> Freeze for GrowingStore<S>where
S: Freeze,
impl<S> RefUnwindSafe for GrowingStore<S>where
S: RefUnwindSafe,
impl<S> Send for GrowingStore<S>where
S: Send,
impl<S> Sync for GrowingStore<S>where
S: Sync,
impl<S> Unpin for GrowingStore<S>where
S: Unpin,
impl<S> UnwindSafe for GrowingStore<S>where
S: UnwindSafe,
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