[][src]Struct grin_chain::linked_list::MultiIndex

pub struct MultiIndex<T> { /* fields omitted */ }

Index supporting multiple duplicate entries.

Implementations

impl<T> MultiIndex<T>[src]

pub fn init(list_prefix: u8, entry_prefix: u8) -> MultiIndex<T>[src]

Initialize a new multi index with the specified list and entry prefixes.

Trait Implementations

impl<T> ListIndex for MultiIndex<T> where
    T: PosEntry
[src]

type List = ListWrapper<T>

List type

type Entry = ListEntry<T>

List entry type

fn pop_pos(
    &self,
    batch: &Batch<'_>,
    commit: Commitment
) -> Result<Option<T>, Error>
[src]

Pop the head of the list. Returns the output_pos. Returns None if list was empty.

impl<T: PosEntry> PruneableListIndex for MultiIndex<T>[src]

fn prune(
    &self,
    _batch: &Batch<'_>,
    _commit: Commitment,
    _cutoff_pos: u64
) -> Result<(), Error>
[src]

Pruning will be more performant than full rebuild but not yet necessary.

fn pop_pos_back(
    &self,
    batch: &Batch<'_>,
    commit: Commitment
) -> Result<Option<T>, Error>
[src]

Pop off the back/tail of the linked list. Used when pruning old data.

impl<T: PosEntry> RewindableListIndex for MultiIndex<T>[src]

List index that supports rewind.

Auto Trait Implementations

impl<T> RefUnwindSafe for MultiIndex<T> where
    T: RefUnwindSafe

impl<T> !Send for MultiIndex<T>

impl<T> !Sync for MultiIndex<T>

impl<T> Unpin for MultiIndex<T>

impl<T> UnwindSafe for MultiIndex<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,