pub trait FromPath: Sized {
const ARITY: usize;
const NAMES: &'static [&'static str] = _;
// Required method
fn from_path(params: &PathParams, names: &[&str]) -> Result<Self, String>;
}Expand description
A type Path can build from route parameters.
Implemented for the standard scalars (one parameter), tuples of up to
six FromStr values (one parameter each, in order), and structs with
#[derive(FromPath)] (one parameter per field, by name). A type of your
own with FromStr works as a one-tuple: Path((slug,)): Path<(Slug,)>.
Required Associated Constants§
Provided Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".