[][src]Trait bm::Tree

pub trait Tree {
    type RootStatus: RootStatus;
    type Construct: Construct;
    fn root(&self) -> <Self::Construct as Construct>::Value;
fn drop<DB: WriteBackend<Construct = Self::Construct> + ?Sized>(
        self,
        db: &mut DB
    ) -> Result<(), Error<DB::Error>>;
fn into_raw(self) -> Raw<Self::RootStatus, Self::Construct>; }

Represents a basic merkle tree with a known root.

Associated Types

type RootStatus: RootStatus

Root status of the tree.

type Construct: Construct

Construct of the tree.

Loading content...

Required methods

fn root(&self) -> <Self::Construct as Construct>::Value

Root of the merkle tree.

fn drop<DB: WriteBackend<Construct = Self::Construct> + ?Sized>(
    self,
    db: &mut DB
) -> Result<(), Error<DB::Error>>

Drop the merkle tree.

fn into_raw(self) -> Raw<Self::RootStatus, Self::Construct>

Convert the tree into a raw tree.

Loading content...

Implementors

impl<R: RootStatus, C: Construct> Tree for List<R, C> where
    C::Value: From<usize> + Into<usize>, 
[src]

type RootStatus = R

type Construct = C

impl<R: RootStatus, C: Construct> Tree for Raw<R, C>[src]

type RootStatus = R

type Construct = C

impl<R: RootStatus, C: Construct> Tree for Vector<R, C>[src]

type RootStatus = R

type Construct = C

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

type RootStatus = R

type Construct = C

impl<R: RootStatus, C: Construct, T, H: ArrayLength<u8>, V: ArrayLength<u8>> Tree for PackedList<R, C, T, H, V> where
    C::Value: From<usize> + Into<usize> + From<GenericArray<u8, H>>,
    T: From<GenericArray<u8, V>>, 
[src]

type RootStatus = R

type Construct = C

impl<R: RootStatus, C: Construct, T, H: ArrayLength<u8>, V: ArrayLength<u8>> Tree for PackedVector<R, C, T, H, V> where
    C::Value: From<GenericArray<u8, H>>,
    T: From<GenericArray<u8, V>>, 
[src]

type RootStatus = R

type Construct = C

Loading content...