Trait FromQueryArgument

pub trait FromQueryArgument: Default {
    type Err;

    // Required method
    fn from_query_argument(argument: &str) -> Result<Self, Self::Err>;
}

Required Associated Types§

type Err

The error that can occur when parsing a query argument.

Required Methods§

fn from_query_argument(argument: &str) -> Result<Self, Self::Err>

Create an instance of Self from a query string.

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§

§

impl<T> FromQueryArgument for T
where T: Default + FromStr, <T as FromStr>::Err: Display,

§

type Err = <T as FromStr>::Err