pub struct Dictionary {
    pub entries: IndexMap<String, Value>,
}
Expand description

A dictionary that can hold a mapping from names to Values

Fields

entries: IndexMap<String, Value>

Implementations

Constructs a new Dictionary.

Find the matching Value for a given key, if possible. If not, return a Primitive::Nothing

Iterate the keys in the Dictionary

Iterate the values in the Dictionary

Checks if given key exists

Find the matching Value for a key, if possible

Get a mutable entry that matches a key, if possible

Insert a new key/value pair into the dictionary

Return size of dictionary

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 this value from the given Serde deserializer. Read more

Create a dictionary from a map of strings to Values

Create the hash function to allow the Hash trait for dictionaries

Feeds a slice of this type into the given Hasher. Read more

Compare two dictionaries for ordering

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Test a dictionary against a Value for equality

This method tests for !=.

Compare two dictionaries for sort ordering

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Get a Dictionary ready to be pretty-printed

A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more

Serialize this value into the given Serde serializer. Read more

Convert to a dictionary, if possible

The type returned in the event of a conversion error.

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

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

Converts a value into a Spanned value

Converts a value into a Spanned value, using an unknown Span

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)

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.