Skip to main content

ValueParser

Trait ValueParser 

Source
pub trait ValueParser {
    type Value<'a>;

    // Required method
    fn try_parse<'input>(
        s: Span<&'input str>,
    ) -> DiagResult<Self::Value<'input>>;
}

Required Associated Types§

Source

type Value<'a>

Required Methods§

Source

fn try_parse<'input>(s: Span<&'input str>) -> DiagResult<Self::Value<'input>>

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 ValueParser for Cow<'_, str>

Source§

type Value<'a> = Cow<'a, str>

Source§

fn try_parse<'input>(s: Span<&'input str>) -> DiagResult<Self::Value<'input>>

Source§

impl ValueParser for i64

Source§

type Value<'a> = i64

Source§

fn try_parse<'input>(s: Span<&'input str>) -> DiagResult<Self::Value<'input>>

Source§

impl ValueParser for str

Source§

type Value<'a> = &'a str

Source§

fn try_parse<'input>(s: Span<&'input str>) -> DiagResult<Self::Value<'input>>

Source§

impl ValueParser for String

Source§

type Value<'a> = String

Source§

fn try_parse<'input>(s: Span<&'input str>) -> DiagResult<Self::Value<'input>>

Implementors§