Trait Parse

Source
pub trait Parse {
    type Error: Error;

    // Required methods
    fn from_str(config: &str) -> Result<HashMap<String, String>, Self::Error>;
    fn from_reader(
        reader: impl Read,
    ) -> Result<HashMap<String, String>, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn from_str(config: &str) -> Result<HashMap<String, String>, Self::Error>

Parses environment from a string.

§Errors

If the input cannot be parsed as a HashMap<String, String>.

Source

fn from_reader( reader: impl Read, ) -> Result<HashMap<String, String>, Self::Error>

Parses environment from a reader.

§Errors

If the input cannot be parsed as a HashMap<String, String>.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§