Trait ValueParser

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

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

Required Associated Types§

Source

type Value<'a>

Required Methods§

Source

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

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 &'static str

Source§

type Value<'a> = &'static str

Source§

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

Source§

impl ValueParser for i64

Source§

type Value<'a> = i64

Source§

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

Source§

impl ValueParser for str

Source§

type Value<'a> = &'a str

Source§

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

Source§

impl ValueParser for String

Source§

type Value<'a> = String

Source§

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

Source§

impl<'b> ValueParser for Cow<'b, str>

Source§

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

Source§

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

Implementors§

Source§

impl<S> ValueParser for VariableName<S>
where for<'a> S: ValueParser<Value<'a> = S>, for<'a> <S as ValueParser>::Value<'a>: AsRef<str>,