[−][src]Struct bm::List
Binary merkle vector.
Methods
impl<R: RootStatus, DB: Backend> List<R, DB> where
EndOf<DB>: From<usize> + Into<usize>,
[src]
EndOf<DB>: From<usize> + Into<usize>,
pub fn get(
&self,
db: &DB,
index: usize
) -> Result<ValueOf<DB>, Error<DB::Error>>
[src]
&self,
db: &DB,
index: usize
) -> Result<ValueOf<DB>, Error<DB::Error>>
Get value at index.
pub fn set(
&mut self,
db: &mut DB,
index: usize,
value: ValueOf<DB>
) -> Result<(), Error<DB::Error>>
[src]
&mut self,
db: &mut DB,
index: usize,
value: ValueOf<DB>
) -> Result<(), Error<DB::Error>>
Set value at index.
pub fn push(
&mut self,
db: &mut DB,
value: ValueOf<DB>
) -> Result<(), Error<DB::Error>>
[src]
&mut self,
db: &mut DB,
value: ValueOf<DB>
) -> Result<(), Error<DB::Error>>
Push a new value to the vector.
pub fn pop(
&mut self,
db: &mut DB
) -> Result<Option<ValueOf<DB>>, Error<DB::Error>>
[src]
&mut self,
db: &mut DB
) -> Result<Option<ValueOf<DB>>, Error<DB::Error>>
Pop a value from the vector.
pub fn deconstruct(self, db: &DB) -> Result<ValueOf<DB>, Error<DB::Error>>
[src]
Deconstruct the vector into one single hash value, and leak only the hash value.
pub fn reconstruct(
root: ValueOf<DB>,
db: &DB,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
[src]
root: ValueOf<DB>,
db: &DB,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
Reconstruct the vector from a single hash value.
impl<DB: Backend> List<Owned, DB> where
EndOf<DB>: From<usize> + Into<usize>,
[src]
EndOf<DB>: From<usize> + Into<usize>,
pub fn create(
db: &mut DB,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
[src]
db: &mut DB,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
Create a new vector.
Trait Implementations
impl<R: RootStatus, DB: Backend> Tree for List<R, DB> where
EndOf<DB>: From<usize> + Into<usize>,
[src]
EndOf<DB>: From<usize> + Into<usize>,
type RootStatus = R
Root status of the tree.
type Backend = DB
Backend of the tree.
fn root(&self) -> ValueOf<DB>
[src]
fn drop(self, db: &mut DB) -> Result<(), Error<DB::Error>>
[src]
fn into_raw(self) -> Raw<R, DB>
[src]
impl<R: RootStatus, DB: Backend> Sequence for List<R, DB> where
EndOf<DB>: From<usize> + Into<usize>,
[src]
EndOf<DB>: From<usize> + Into<usize>,
impl<R: RootStatus, DB: Backend> Leak for List<R, DB> where
EndOf<DB>: From<usize> + Into<usize>,
[src]
EndOf<DB>: From<usize> + Into<usize>,
Auto Trait Implementations
impl<R, DB> Sync for List<R, DB> where
R: Sync,
<DB as Backend>::End: Sync,
<DB as Backend>::Intermediate: Sync,
R: Sync,
<DB as Backend>::End: Sync,
<DB as Backend>::Intermediate: Sync,
impl<R, DB> Unpin for List<R, DB> where
R: Unpin,
<DB as Backend>::End: Unpin,
<DB as Backend>::Intermediate: Unpin,
R: Unpin,
<DB as Backend>::End: Unpin,
<DB as Backend>::Intermediate: Unpin,
impl<R, DB> Send for List<R, DB> where
R: Send,
<DB as Backend>::End: Send,
<DB as Backend>::Intermediate: Send,
R: Send,
<DB as Backend>::End: Send,
<DB as Backend>::Intermediate: Send,
impl<R, DB> RefUnwindSafe for List<R, DB> where
R: RefUnwindSafe,
<DB as Backend>::End: RefUnwindSafe,
<DB as Backend>::Intermediate: RefUnwindSafe,
R: RefUnwindSafe,
<DB as Backend>::End: RefUnwindSafe,
<DB as Backend>::Intermediate: RefUnwindSafe,
impl<R, DB> UnwindSafe for List<R, DB> where
R: UnwindSafe,
<DB as Backend>::End: UnwindSafe,
<DB as Backend>::Intermediate: UnwindSafe,
R: UnwindSafe,
<DB as Backend>::End: UnwindSafe,
<DB as Backend>::Intermediate: 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, 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