Struct ezomyte::Properties [] [src]

pub struct Properties { /* fields omitted */ }

Container for miscellaneous item properties. These are commonly obtained from the "properties" JSON array in the stash tabs API response.

Most properties have values associated with them (e.g. weapon damage ranges), though some serve as mere "markers" or "tags" (like gem classes: Spell, Support, Minion, etc.).

Methods

impl Properties
[src]

[src]

Create a new property container.

impl Properties
[src]

[src]

Checks whether given property exists.

[src]

Retrieve the Value of given property, if it exists and has one.

[src]

Checks whether the properties container is empty.

Important traits for Box<W>
[src]

Return an iterator over property keys & optional values as pairs.

Important traits for Box<W>
[src]

Return an iterator over property keys (names).

[src]

Returns the total number of properties (with or without values).

impl Properties
[src]

[src]

Clears the container, removing all properties.

[src]

Insert a new property, possibly with a value, into the container.

If opt_value is None, the property will be inserted without any value associated with it.

If the property exists already, its value is updated and the previous one, if any, is returned. This means that in case the property existed before but didn't have a value, the function will return Some(None).

Important traits for Box<W>
[src]

Returns an iterator of all over property keys & their optional values.

The type of iterator element is (&Key, Option<&mut Value>). Notice that this doesn't allow to add/remove values associated with properties, but only modify the value if they already have one.

[src]

Insert a new, value-less property into the container.

If the property exists already, its value is reset and the previous one, if any, is returned. This means that in case the property existed before but didn't have a value, the function will return Some(None).

If the property didn't exist already, None is returned.

[src]

Insert a new property with given value into the container.

If the property exists already, its value is updated and the previous one, if any, is returned. This means that in case the property existed before but didn't have a value, the function will return Some(None).

[src]

Remove a property from the container and return the value associated with it, if any.

If the property didn't exist, this method will return None. Contrast this with the situation where the property existed but didn't have a value associated with it, in which case the return value will be Some(None).

Trait Implementations

impl Default for Properties
[src]

[src]

Returns the "default value" for a type. Read more

impl FromIterator<String> for Properties
[src]

[src]

Creates a value from an iterator. Read more

impl FromIterator<(String, String)> for Properties
[src]

[src]

Creates a value from an iterator. Read more

impl FromIterator<(String, Option<String>)> for Properties
[src]

[src]

Creates a value from an iterator. Read more

impl IntoIterator for Properties
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'p> IntoIterator for &'p Properties
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl Debug for Properties
[src]

[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Properties
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for Properties

impl !Sync for Properties