spin_locked_app::values

Type Alias ValuesMap

Source
pub type ValuesMap = Map<String, Value>;
Expand description

A String-keyed map with dynamically-typed values.

Aliased Type§

struct ValuesMap { /* private fields */ }

Trait Implementations§

Source§

impl MetadataExt for ValuesMap

Source§

fn get_value(&self, key: &str) -> Option<&Value>

Get a value from a metadata map
Source§

fn get_typed<'a, T: Deserialize<'a>>( &'a self, key: MetadataKey<T>, ) -> Result<Option<T>>

Get a typed value from a metadata map
Source§

fn require_typed<'a, T: Deserialize<'a>>( &'a self, key: MetadataKey<T>, ) -> Result<T>

Get a required value from a metadata map, returning an error if it is not present