Skip to main content

Params

Trait Params 

Source
pub trait Params
where Self: Sized,
{ // Required method fn from_map(map: &ParamsMap) -> Result<Self, ParamsError>; }
Expand description

A simple method of deserializing key-value data (like route params or URL search) into a concrete data type. Self should typically be a struct in which each field’s type implements FromStr.

Required Methods§

Source

fn from_map(map: &ParamsMap) -> Result<Self, ParamsError>

Attempts to deserialize the map into the given type.

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 Params for ()

Implementors§