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§

source

type Value<'c>

Type of values

Required Methods§

source

fn try_string_map(&self) -> Result<(), TypeMismatch>

Return error unless datum is a string-map-like type

source

fn string_map_get( &self, key: &str ) -> Result<Self::Value<'static>, MachineError>

Get entry from string map

source

fn string_map_set<'c>( &self, key: &str, value: Self::Value<'c> ) -> Result<(), MachineError>

Set entry in string map

Implementors§