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