Trait Parse

Source
pub trait Parse: Sized {
    type Error: Error;

    // Required method
    fn parse(value: OsString) -> Result<Self, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn parse(value: OsString) -> Result<Self, Self::Error>

Parse input string to type T.

§Errors

When the string value cannot be parsed as Self.

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.

Implementations on Foreign Types§

Source§

impl Parse for bool

Source§

type Error = ParseError

Source§

fn parse(value: OsString) -> Result<Self, Self::Error>

Source§

impl Parse for usize

Source§

type Error = ParseError

Source§

fn parse(value: OsString) -> Result<Self, Self::Error>

Source§

impl Parse for String

Source§

type Error = Infallible

Source§

fn parse(value: OsString) -> Result<Self, Self::Error>

Source§

impl Parse for OsString

Source§

type Error = Infallible

Source§

fn parse(value: OsString) -> Result<Self, Self::Error>

Implementors§