Trait ParseInput

Source
pub trait ParseInput {
    // Required method
    fn parse_input<T>(
        &self,
        name: impl AsRef<OsStr>,
    ) -> Result<Option<T>, <T as Parse>::Error>
       where T: Parse;
}

Required Methods§

Source

fn parse_input<T>( &self, name: impl AsRef<OsStr>, ) -> Result<Option<T>, <T as Parse>::Error>
where T: Parse,

Parse the value of an input.

Attempts to parse as T if a value is present, other returns Ok(None).

§Errors

If the variable cannot be parsed.

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§

Source§

impl<E> ParseInput for E
where E: Read,