Trait gotham::router::request::path::FromRequestPath
[−]
[src]
pub trait FromRequestPath { fn from_request_path(
_: &[&PercentDecoded]
) -> Result<Self, FromRequestPathError>
where
Self: Sized; }
Converts string data received as part of a Request
path to type safe values for usage by
Middleware
and Handlers
.
Required Methods
fn from_request_path(
_: &[&PercentDecoded]
) -> Result<Self, FromRequestPathError> where
Self: Sized,
_: &[&PercentDecoded]
) -> Result<Self, FromRequestPathError> where
Self: Sized,
Converts a 1..n
Request
path segments into type safe values.
Panic
If the input data is not of the expected format or size a panic will occur.
e.g. Multiple segments due to usage of a Glob are provided for a value that should
only be generated from a single segment, such as a u8
.
Implementors
impl<T> FromRequestPath for Option<T> where
T: FromRequestPath,impl FromRequestPath for String
impl FromRequestPath for bool
impl FromRequestPath for f32
impl FromRequestPath for f64
impl FromRequestPath for isize
impl FromRequestPath for i8
impl FromRequestPath for i16
impl FromRequestPath for i32
impl FromRequestPath for i64
impl FromRequestPath for usize
impl FromRequestPath for u8
impl FromRequestPath for u16
impl FromRequestPath for u32
impl FromRequestPath for u64