pub struct Path<T>(pub T);Expand description
Extract route params (:id, :slug, …) into a typed value.
For a single param route, Path<u64> reads the lone value. For multiple
params, use a struct with #[derive(Deserialize)] and field names matching
the route pattern.
Tuple Fields§
§0: TTrait Implementations§
impl<T: Eq> Eq for Path<T>
Source§impl<T> FromFlowRequest for Path<T>where
T: DeserializeOwned,
impl<T> FromFlowRequest for Path<T>where
T: DeserializeOwned,
fn from_request(req: &FlowRequest) -> Result<Self>
impl<T: PartialEq> StructuralPartialEq for Path<T>
Auto Trait Implementations§
impl<T> Freeze for Path<T>where
T: Freeze,
impl<T> RefUnwindSafe for Path<T>where
T: RefUnwindSafe,
impl<T> Send for Path<T>where
T: Send,
impl<T> Sync for Path<T>where
T: Sync,
impl<T> Unpin for Path<T>where
T: Unpin,
impl<T> UnsafeUnpin for Path<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Path<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more