[][src]Struct bm::LengthMixed

pub struct LengthMixed<R: RootStatus, DB: Backend, S: Sequence<Backend = DB, RootStatus = Dangling>> { /* fields omitted */ }

A tree with length mixed in.

Methods

impl<R: RootStatus, DB: Backend, S> LengthMixed<R, DB, S> where
    S: Sequence<Backend = DB, RootStatus = Dangling>,
    EndOf<DB>: From<usize> + Into<usize>, 
[src]

pub fn reconstruct<F>(
    root: ValueOf<DB>,
    db: &DB,
    f: F
) -> Result<Self, Error<DB::Error>> where
    F: FnOnce(Raw<Dangling, DB>, &DB, usize) -> Result<S, Error<DB::Error>>, 
[src]

Reconstruct the mixed-length tree.

pub fn deconstruct(self, db: &DB) -> Result<ValueOf<DB>, Error<DB::Error>>[src]

Deconstruct the mixed-length tree.

pub fn with<RT, F>(&self, db: &DB, f: F) -> Result<RT, Error<DB::Error>> where
    F: FnOnce(&S, &DB) -> Result<RT, Error<DB::Error>>, 
[src]

Call with the inner sequence.

pub fn with_mut<RT, F>(
    &mut self,
    db: &mut DB,
    f: F
) -> Result<RT, Error<DB::Error>> where
    F: FnOnce(&mut S, &mut DB) -> Result<RT, Error<DB::Error>>, 
[src]

Call with a mutable reference to the inner sequence.

impl<DB: Backend, S> LengthMixed<Owned, DB, S> where
    S: Sequence<Backend = DB, RootStatus = Dangling> + Leak,
    EndOf<DB>: From<usize> + Into<usize>, 
[src]

pub fn create<OS, F>(db: &mut DB, f: F) -> Result<Self, Error<DB::Error>> where
    F: FnOnce(&mut DB) -> Result<OS, Error<DB::Error>>,
    OS: Sequence<Backend = DB> + Leak<Metadata = S::Metadata>, 
[src]

Create a new mixed-length tree.

Trait Implementations

impl<R: RootStatus, DB: Backend, S> Tree for LengthMixed<R, DB, S> where
    S: Sequence<Backend = DB, RootStatus = Dangling>, 
[src]

type RootStatus = R

Root status of the tree.

type Backend = DB

Backend of the tree.

impl<R: RootStatus, DB: Backend, S> Sequence for LengthMixed<R, DB, S> where
    S: Sequence<Backend = DB, RootStatus = Dangling>, 
[src]

impl<R: RootStatus, DB: Backend, S> Leak for LengthMixed<R, DB, S> where
    S: Sequence<Backend = DB, RootStatus = Dangling> + Leak
[src]

type Metadata = (ValueOf<DB>, S::Metadata)

Metadata to represent this merkle struct.

Auto Trait Implementations

impl<R, DB, S> Send for LengthMixed<R, DB, S> where
    R: Send,
    S: Send,
    <DB as Backend>::End: Send,
    <DB as Backend>::Intermediate: Send

impl<R, DB, S> Unpin for LengthMixed<R, DB, S> where
    R: Unpin,
    S: Unpin,
    <DB as Backend>::End: Unpin,
    <DB as Backend>::Intermediate: Unpin

impl<R, DB, S> Sync for LengthMixed<R, DB, S> where
    R: Sync,
    S: Sync,
    <DB as Backend>::End: Sync,
    <DB as Backend>::Intermediate: Sync

impl<R, DB, S> UnwindSafe for LengthMixed<R, DB, S> where
    R: UnwindSafe,
    S: UnwindSafe,
    <DB as Backend>::End: UnwindSafe,
    <DB as Backend>::Intermediate: UnwindSafe

impl<R, DB, S> RefUnwindSafe for LengthMixed<R, DB, S> where
    R: RefUnwindSafe,
    S: RefUnwindSafe,
    <DB as Backend>::End: RefUnwindSafe,
    <DB as Backend>::Intermediate: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self