Struct baggie::Baggie

source ·
pub struct Baggie<K>where
    K: Eq + Hash,
{ /* private fields */ }
Expand description

struct for collecting values of any type with a string key

Implementations§

Initialize an empty Baggie

Insert a value into the baggie.

Get a reference to something in the baggie

Get a mutable reference to something in the baggie

An iterator visiting all keys in arbitrary order.

Number of elements in the map

Clear the map of all key value pairs; but maintains allocated memory

Determine if the Baggie is empty

Returns true if the map contains a value for the given key.

Remove a key-value pair from the Baggie by key. if the key value pair existed, the raw Box<dyn Any> value will be returned

Trait Implementations§

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

Returns the argument unchanged.

Calls U::from(self).

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

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.