pub struct Mapxnk<K, V> where
    K: NumKey,
    V: Clone + PartialEq + Serialize + DeserializeOwned + Debug
{ /* fields omitted */ }
Expand description

To solve the problem of unlimited memory usage, use this to replace the original in-memory BTreeMap<_, _>.

Implementations

Create an instance.

Get the database storage path

Imitate the behavior of ‘BTreeMap<_>.get(…)’

Any faster/better choice other than JSON ?

Get the closest smaller value

Get the closest larger value

Imitate the behavior of ‘BTreeMap<_>.get_mut(…)’

Imitate the behavior of ‘BTreeMap<_>.len()’.

A helper func

Imitate the behavior of ‘BTreeMap<_>.insert(…)’.

Similar with insert, but ignore the old value.

Imitate the behavior of ‘.entry(…).or_insert(…)’

Imitate the behavior of ‘.iter()’

range(start..end)

Check if a key is exists.

Remove a <K, V> from mem and disk.

Remove a <K, V> from mem and disk.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

Performs the conversion.

Performs the conversion.

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)

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.