pub struct MultiIndex<'a, K, T> { /* private fields */ }
Expand description

MultiIndex stores (namespace, index_name, idx_value, pk) -> b“pk_len“. Allows many values per index, and references pk. The associated primary key value is stored in the main (pk_namespace) map, which stores (namespace, pk_namespace, pk) -> value.

The stored pk_len is used to recover the pk from the index namespace, and perform the secondary load of the associated value from the main map.

The MultiIndex definition must include a field for the pk. That is, the MultiIndex K value is always a n-tuple (n >= 2) and its last element must be the pk. The index function must therefore put the pk as last element, when generating the index.

Implementations

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

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.