Struct ajars_actix_web::actix_web::dev::Path [−]
pub struct Path<T> { /* fields omitted */ }
Expand description
Resource path match information
If resource path contains variable patterns, Path
stores them.
Implementations
impl<T> Path<T> where
T: ResourcePath,
impl<T> Path<T> where
T: ResourcePath,
pub fn set(&mut self, path: T)
pub fn set(&mut self, path: T)
Set new path
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset state
pub fn unprocessed(&self) -> &str
pub fn unprocessed(&self) -> &str
Get unprocessed part of the path
Get matched parameter by name.
If keyed parameter is not available empty string is used as default value.
pub fn iter(&self) -> PathIter<'_, T>
pub fn iter(&self) -> PathIter<'_, T>
Return iterator to items in parameter container
pub fn load<'de, U>(&'de self) -> Result<U, Error> where
U: Deserialize<'de>,
pub fn load<'de, U>(&'de self) -> Result<U, Error> where
U: Deserialize<'de>,
Try to deserialize matching parameters to a specified type U
Trait Implementations
impl<'a, T> Index<&'a str> for Path<T> where
T: ResourcePath,
impl<'a, T> Index<&'a str> for Path<T> where
T: ResourcePath,
impl<T> Index<usize> for Path<T> where
T: ResourcePath,
impl<T> Index<usize> for Path<T> where
T: ResourcePath,
impl<T> Resource<T> for Path<T> where
T: ResourcePath,
impl<T> Resource<T> for Path<T> where
T: ResourcePath,
pub fn resource_path(&mut self) -> &mut Path<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Path<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Path<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self