Trait generic_json::MetaValue [−][src]
pub trait MetaValue<T: Json> {
fn new(value: Value<T>, metadata: T::MetaData) -> Self;
fn value(&self) -> ValueRef<'_, T>;
fn value_mut(&mut self) -> ValueMut<'_, T>;
fn metadata(&self) -> &T::MetaData;
fn as_pair(&self) -> (ValueRef<'_, T>, &T::MetaData);
fn as_pair_mut(&mut self) -> (ValueMut<'_, T>, &T::MetaData);
}Expand description
JSON value attached to some metadata.
Required methods
Creates a new “meta value” from a Value and its associated metadata.
Returns a reference to the actual JSON value (without the metadata).
Returns a mutable reference to the actual JSON value (without the metadata).
Returns a reference to the metadata associated to the JSON value.
Returns a pair containing a reference to the JSON value and a reference to its metadata.