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