Struct canrun::collections::lmap::LMap

source ·
pub struct LMap<K: Unify + Eq + Hash + Debug, V: Unify + Debug> { /* private fields */ }
Expand description

A HashMap-like data structure with LVar keys and values.

Implementations§

Create a new LMap value.

You may also be interested in the lmap! macro.

Example:
use canrun::lmap::LMap;

let map: LMap<i32, i32> = LMap::new();

Add a key/value pair to an existing LMap.

Example:
use canrun::lmap::LMap;

let mut map: LMap<i32, i32> = LMap::new();
map.insert(1, 2);

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
The “concrete” type that Self reifies to.
Extract a reified Self from a compatible State. This trait is usually used indirectly through the Query trait. Read more
Attempt to unify two fully resolved values. 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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.