Trait sandkiste::types::MaybeStringMap
source · pub trait MaybeStringMap {
type Value<'c>;
// Required methods
fn try_string_map(&self) -> Result<(), TypeMismatch>;
fn string_map_get(
&self,
key: &str
) -> Result<Self::Value<'static>, MachineError>;
fn string_map_set<'c>(
&self,
key: &str,
value: Self::Value<'c>
) -> Result<(), MachineError>;
}
Expand description
Types that can be a string map (mapping strings to other datums)
Required Associated Types§
Required Methods§
sourcefn try_string_map(&self) -> Result<(), TypeMismatch>
fn try_string_map(&self) -> Result<(), TypeMismatch>
Return error unless datum is a string-map-like type
sourcefn string_map_get(
&self,
key: &str
) -> Result<Self::Value<'static>, MachineError>
fn string_map_get( &self, key: &str ) -> Result<Self::Value<'static>, MachineError>
Get entry from string map
sourcefn string_map_set<'c>(
&self,
key: &str,
value: Self::Value<'c>
) -> Result<(), MachineError>
fn string_map_set<'c>( &self, key: &str, value: Self::Value<'c> ) -> Result<(), MachineError>
Set entry in string map