[][src]Trait bm::Tree

pub trait Tree {
    type RootStatus: RootStatus;
    type Backend: Backend;
    fn root(&self) -> ValueOf<Self::Backend>;
fn drop(
        self,
        db: &mut Self::Backend
    ) -> Result<(), Error<<Self::Backend as Backend>::Error>>;
fn into_raw(self) -> Raw<Self::RootStatus, Self::Backend>; }

Represents a basic merkle tree with a known root.

Associated Types

type RootStatus: RootStatus

Root status of the tree.

type Backend: Backend

Backend of the tree.

Loading content...

Required methods

fn root(&self) -> ValueOf<Self::Backend>

Root of the merkle tree.

fn drop(
    self,
    db: &mut Self::Backend
) -> Result<(), Error<<Self::Backend as Backend>::Error>>

Drop the merkle tree.

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

Convert the tree into a raw tree.

Loading content...

Implementors

impl<R: RootStatus, DB: Backend> Tree for List<R, DB> where
    EndOf<DB>: From<usize> + Into<usize>, 
[src]

type RootStatus = R

type Backend = DB

impl<R: RootStatus, DB: Backend> Tree for Raw<R, DB>[src]

type RootStatus = R

type Backend = DB

impl<R: RootStatus, DB: Backend> Tree for Vector<R, DB>[src]

type RootStatus = R

type Backend = DB

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

type RootStatus = R

type Backend = DB

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

type RootStatus = R

type Backend = DB

impl<R: RootStatus, DB: Backend, T, H: ArrayLength<u8>, V: ArrayLength<u8>> Tree for PackedVector<R, DB, T, H, V> where
    EndOf<DB>: From<GenericArray<u8, H>> + Into<GenericArray<u8, H>>,
    T: From<GenericArray<u8, V>> + Into<GenericArray<u8, V>>, 
[src]

type RootStatus = R

type Backend = DB

Loading content...