[−][src]Struct bm::Vector
Binary merkle tuple.
Methods
impl<R: RootStatus, DB: Backend> Vector<R, DB>
[src]
pub fn current_max_len(&self) -> usize
[src]
Current maximum length of the vector.
pub fn max_len(&self) -> Option<usize>
[src]
Overall maximum length of the vector.
pub fn depth(&self) -> usize
[src]
Depth of the vector.
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 len(&self) -> usize
[src]
Get the length of the tuple.
pub fn from_raw(raw: Raw<R, DB>, len: usize, max_len: Option<usize>) -> Self
[src]
Create a tuple from raw merkle tree.
impl<DB: Backend> Vector<Owned, DB>
[src]
pub fn create(
db: &mut DB,
len: usize,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
[src]
db: &mut DB,
len: usize,
max_len: Option<usize>
) -> Result<Self, Error<DB::Error>>
Create a new tuple.
Trait Implementations
impl<R: RootStatus, DB: Backend> Tree for Vector<R, DB>
[src]
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 Vector<R, DB>
[src]
impl<R: RootStatus, DB: Backend> Leak for Vector<R, DB>
[src]
Auto Trait Implementations
impl<R, DB> Send for Vector<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> Unpin for Vector<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> Sync for Vector<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> UnwindSafe for Vector<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,
impl<R, DB> RefUnwindSafe for Vector<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,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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