Struct gchemol_core::PropertyStore
source · pub struct PropertyStore { /* private fields */ }
Expand description
A container storing extra information managed as key/value pairs
Implementations§
source§impl PropertyStore
impl PropertyStore
sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Returns true if the map contains a value for the specified key.
sourcepub fn load<D: DeserializeOwned>(&self, key: &str) -> Result<D>
pub fn load<D: DeserializeOwned>(&self, key: &str) -> Result<D>
Retrieve property associated with the key
Trait Implementations§
source§impl Clone for PropertyStore
impl Clone for PropertyStore
source§fn clone(&self) -> PropertyStore
fn clone(&self) -> PropertyStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PropertyStore
impl Debug for PropertyStore
source§impl Default for PropertyStore
impl Default for PropertyStore
source§fn default() -> PropertyStore
fn default() -> PropertyStore
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PropertyStore
impl<'de> Deserialize<'de> for PropertyStore
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PropertyStore
impl Send for PropertyStore
impl Sync for PropertyStore
impl Unpin for PropertyStore
impl UnwindSafe for PropertyStore
Blanket Implementations§
source§impl<T> Configure for Twhere
T: Default + DeserializeOwned + Serialize,
impl<T> Configure for Twhere T: Default + DeserializeOwned + Serialize,
source§fn print_toml(&self)
fn print_toml(&self)
👎Deprecated: plan to be removed
Print current configuration in toml format.
source§fn from_json(s: &str) -> Result<Self, Error>
fn from_json(s: &str) -> Result<Self, Error>
Deserialize an instance of type T from a string of JSON text.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.