Struct gluon_base::scoped_map::ScopedMap[][src]

pub struct ScopedMap<K: Eq + Hash, V> { /* fields omitted */ }
Expand description

A map struct which allows for the introduction of different scopes Introducing a new scope will make it possible to introduce additional variables with names already defined, shadowing the old name After exiting a scope the shadowed variable will again be re introduced

Implementations

Introduces a new scope

Exits the current scope, returning an iterator over the (key, value) pairs that are removed When ExitScopeIter is dropped any remaining pairs of the scope is removed as well.

Removes a previously inserted value from the map.

Returns true if the key has a value declared in the last declared scope

Returns a reference to the last inserted value corresponding to the key

Returns a reference to the all inserted value corresponding to the key

Returns the number of elements in the container. Shadowed elements are counted

Returns true if this map is empty

Removes all elements

Swaps the value stored at key, or inserts it if it is not present

Returns an iterator of the (key, values) pairs inserted in the map

Trait Implementations

Formats the value using the given formatter. Read more

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

Extends a collection with the contents of an iterator. Read more

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

Extends a collection with exactly one element.

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

Reserves capacity in a collection for the given number of additional elements. 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 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.