pub trait TryFromParam: Sized {
// Required method
fn try_from_param(param: &str) -> Option<Self>;
}
Expand description
Fallible conversion between a param capture into a value.
Implemented for all types that implement FromStr
by default.
Required Methods§
Sourcefn try_from_param(param: &str) -> Option<Self>
fn try_from_param(param: &str) -> Option<Self>
Creates a new value of this type from the given param. Returns None
if the param cannot
be converted into a value of this 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.