pub trait ParseInput: Sized {
    type Error: Error;

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

Required Associated Types§

Required Methods§

source

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

Parse input string to type T.

Errors

When the string value cannot be parsed as Self.

Implementations on Foreign Types§

source§

impl ParseInput for String

§

type Error = Infallible

source§

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

source§

impl ParseInput for bool

§

type Error = ParseError

source§

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

Implementors§