pub struct Dex<I: Identifiable>(pub HashMap<I::Id, Arc<I>>);
Expand description

A Dex is used to hold types with an identifiable value (see Identifiable).

Tuple Fields

0: HashMap<I::Id, Arc<I>>

Implementations

Try to get an identifiable value from the Dex.

Get the unknown value from the Dex.

Get the identifiable value from the Dex, or return the unknown value.

Get the length of the Dex.

Check if the Dex is empty

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

Deserialize Dex from a Vec

Deserialize this value from the given Serde deserializer. Read more

Serialize Dex as a Vec

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

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 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.