[][src]Trait multiproof_rs::keys::Key

pub trait Key<T> {
    fn tail(&self) -> Self;
fn len(&self) -> usize;
fn is_empty(&self) -> bool; }

Used as an abstraction of the key type, for handling in generic tree/proof constructions.

Required methods

fn tail(&self) -> Self

Returns a copy of the current key, in which the first unit (i.e. byte, bit, nibble) has been removed. Note that the tail of an empty list is another empty list.

fn len(&self) -> usize

Returns the number of units (i.e. bit, nibble or byte)

fn is_empty(&self) -> bool

Returns true if the key is zero unit long.

Loading content...

Implementors

impl Key<u8> for BinaryKey[src]

impl Key<u8> for ByteKey[src]

impl Key<u8> for NibbleKey[src]

Loading content...