[−][src]Struct bm::InMemoryBackend
In-memory merkle database.
Methods
impl<D: Digest, T: AsRef<[u8]> + Clone + Default> InMemoryBackend<D, T>
[src]
pub fn new_with_unit_empty(value: EndOf<Self>) -> Self
[src]
Create an in-memory database with unit empty value.
pub fn new_with_inherited_empty() -> Self
[src]
Create an in-memory database with inherited empty value.
pub fn populate(
&mut self,
proofs: Map<IntermediateOf<Self>, (ValueOf<Self>, ValueOf<Self>)>
)
[src]
&mut self,
proofs: Map<IntermediateOf<Self>, (ValueOf<Self>, ValueOf<Self>)>
)
Populate the database with proofs.
Trait Implementations
impl<D: Digest, V: AsRef<[u8]> + Clone + Default> Backend for InMemoryBackend<D, V>
[src]
type Intermediate = GenericArray<u8, D::OutputSize>
Intermediate value stored in this merkle database.
type End = V
End value stored in this merkle database.
type Error = InMemoryBackendError
Error type for DB access.
fn intermediate_of(
&self,
left: &ValueOf<Self>,
right: &ValueOf<Self>
) -> IntermediateOf<Self>
[src]
&self,
left: &ValueOf<Self>,
right: &ValueOf<Self>
) -> IntermediateOf<Self>
fn empty_at(
&mut self,
depth_to_bottom: usize
) -> Result<ValueOf<Self>, Self::Error>
[src]
&mut self,
depth_to_bottom: usize
) -> Result<ValueOf<Self>, Self::Error>
fn get(
&self,
key: &IntermediateOf<Self>
) -> Result<(ValueOf<Self>, ValueOf<Self>), Self::Error>
[src]
&self,
key: &IntermediateOf<Self>
) -> Result<(ValueOf<Self>, ValueOf<Self>), Self::Error>
fn rootify(&mut self, key: &IntermediateOf<Self>) -> Result<(), Self::Error>
[src]
fn unrootify(&mut self, key: &IntermediateOf<Self>) -> Result<(), Self::Error>
[src]
fn insert(
&mut self,
key: IntermediateOf<Self>,
value: (ValueOf<Self>, ValueOf<Self>)
) -> Result<(), Self::Error>
[src]
&mut self,
key: IntermediateOf<Self>,
value: (ValueOf<Self>, ValueOf<Self>)
) -> Result<(), Self::Error>
impl<D: Clone + Digest, T: Clone + AsRef<[u8]> + Default> Clone for InMemoryBackend<D, T>
[src]
fn clone(&self) -> InMemoryBackend<D, T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<D: Digest, T: AsRef<[u8]> + Clone + Default> AsRef<HashMap<<InMemoryBackend<D, T> as Backend>::Intermediate, ((Value<<InMemoryBackend<D, T> as Backend>::Intermediate, <InMemoryBackend<D, T> as Backend>::End>, Value<<InMemoryBackend<D, T> as Backend>::Intermediate, <InMemoryBackend<D, T> as Backend>::End>), Option<usize>), RandomState>> for InMemoryBackend<D, T>
[src]
Auto Trait Implementations
impl<D, T> Sync for InMemoryBackend<D, T> where
T: Sync,
<D as Digest>::OutputSize: ArrayLength<u8>,
T: Sync,
<D as Digest>::OutputSize: ArrayLength<u8>,
impl<D, T> Unpin for InMemoryBackend<D, T> where
T: Unpin,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin,
T: Unpin,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<D, T> Send for InMemoryBackend<D, T> where
T: Send,
<D as Digest>::OutputSize: ArrayLength<u8>,
T: Send,
<D as Digest>::OutputSize: ArrayLength<u8>,
impl<D, T> RefUnwindSafe for InMemoryBackend<D, T> where
T: RefUnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
T: RefUnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D, T> UnwindSafe for InMemoryBackend<D, T> where
T: RefUnwindSafe + UnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self