[][src]Struct bm::LengthMixed

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

A tree with length mixed in.

Methods

impl<R: RootStatus, C: Construct, S> LengthMixed<R, C, S> where
    S: Sequence<Construct = C, RootStatus = Dangling>,
    C::Value: From<usize> + Into<usize>, 
[src]

pub fn reconstruct<DB: WriteBackend<Construct = C> + ?Sized, F>(
    root: C::Value,
    db: &mut DB,
    f: F
) -> Result<Self, Error<DB::Error>> where
    F: FnOnce(Raw<Dangling, C>, &mut DB, usize) -> Result<S, Error<DB::Error>>, 
[src]

Reconstruct the mixed-length tree.

pub fn deconstruct<DB: ReadBackend<Construct = C> + ?Sized>(
    self,
    db: &mut DB
) -> Result<C::Value, Error<DB::Error>>
[src]

Deconstruct the mixed-length tree.

pub fn with<DB: Backend<Construct = C> + ?Sized, RT, F>(
    &self,
    db: &mut DB,
    f: F
) -> Result<RT, Error<DB::Error>> where
    F: FnOnce(&S, &mut DB) -> Result<RT, Error<DB::Error>>, 
[src]

Call with the inner sequence.

pub fn with_mut<DB: WriteBackend<Construct = C> + ?Sized, 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<C: Construct, S> LengthMixed<Owned, C, S> where
    S: Sequence<Construct = C, RootStatus = Dangling> + Leak,
    C::Value: From<usize> + Into<usize>, 
[src]

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

Create a new mixed-length tree.

Trait Implementations

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

type RootStatus = R

Root status of the tree.

type Construct = C

Construct of the tree.

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

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

type Metadata = (C::Value, S::Metadata)

Metadata to represent this merkle struct.

Auto Trait Implementations

impl<R, C, S> Sync for LengthMixed<R, C, S> where
    C: Sync,
    R: Sync,
    S: Sync,
    <C as Construct>::Value: Sync

impl<R, C, S> Send for LengthMixed<R, C, S> where
    C: Send,
    R: Send,
    S: Send,
    <C as Construct>::Value: Send

impl<R, C, S> Unpin for LengthMixed<R, C, S> where
    C: Unpin,
    R: Unpin,
    S: Unpin,
    <C as Construct>::Value: Unpin

impl<R, C, S> RefUnwindSafe for LengthMixed<R, C, S> where
    C: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe,
    <C as Construct>::Value: RefUnwindSafe

impl<R, C, S> UnwindSafe for LengthMixed<R, C, S> where
    C: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe,
    <C as Construct>::Value: UnwindSafe

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