Struct tari_mmr::MemBackendVec[][src]

pub struct MemBackendVec<T> { /* fields omitted */ }
Expand description

MemBackendVec is a shareable, memory only, vector that can be be used with MmrCache to store checkpoints.

Implementations

Trait Implementations

Returns the number of hashes stored in the backend

Returns if empty

Store a new item and return the index of the stored item

Return the item at the given index

Remove all stored items from the the backend.

Finds the index of the specified stored item, it will return None if the object could not be found.

Shortens the array, keeping the first len elements and dropping the rest.

Shift the array, by discarding the first n elements from the front.

Store a new item first in the array, previous items will be shifted up to make room.

Execute the given closure for each value in the array

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Completely overwrites this value.

Performs the conversion.

Called to initialize a place to a valid value, after it is set to all-bits-zero. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.