Struct comlib_common::MiniMap[][src]

pub struct MiniMap<K, V> { /* fields omitted */ }
Expand description

Map data structure optimized for small number of elements.

The API is modelled after BTreeMap and HashMap. Implements [Entry API] for easier access and modification of the map, modelled after [Standard library Entry API].

[Entry API]: [Standard library Entry API]: https://doc.rust-lang.org/std/collections/index.html#entries

Implementations

Constructs a new MiniMap.

Inserts the given value at the given key.

Returns the previous value stored at the key, if one exists.

Returns a reference to a value corresponding to the key.

Returns a mutable reference to a value corresponding to the key.

Turns the map into an ordered vector of key-value pairs.

Gets the given key’s corresponding entry in the map for in-place manipulation.

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

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

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)

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.