Trait humphrey_server::config::extended_hashmap::ExtendedMap[][src]

pub trait ExtendedMap<K, V> {
    fn get_owned(&self, key: K) -> Option<V>;
fn get_optional(&self, key: K, default: V) -> V;
fn get_compulsory(
        &self,
        key: K,
        error: &'static str
    ) -> Result<V, &'static str>;
fn get_optional_parsed<T>(
        &self,
        key: K,
        default: T,
        error: &'static str
    ) -> Result<T, &'static str>
    where
        T: FromStr
;
fn get_compulsory_parsed<T>(
        &self,
        key: K,
        error: &'static str
    ) -> Result<T, &'static str>
    where
        T: FromStr
; }

Required methods

Gets an item from the map by value.

Gets an item from the map or returns a given default.

Gets an item from the map or returns the given error.

Gets an item from the map or a given default and parses it, or returns the given error.

Gets an item from the map and parses it, or returns the given error.

Implementations on Foreign Types

Implementors