pub struct Path<T>(pub T);Expand description
Typed path parameter: Path<i64> binds the LEAF-MOST (last) captured
parameter; use a tuple to address all parameters root→leaf — Path<(A, B)> /
Path<(A, B, C)> grab two/three {param}s in route order. Param types are
the sealed PathParam set (integers, String, bool, floats, char);
custom newtypes opt in through the path_param! macro.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: PathParam> FromRequest for Path<T>
impl<T: PathParam> FromRequest for Path<T>
async fn from_request(ctx: &mut RequestCtx) -> Result<Self>
Source§impl<A: PathParam, B: PathParam> FromRequest for Path<(A, B)>
impl<A: PathParam, B: PathParam> FromRequest for Path<(A, B)>
async fn from_request(ctx: &mut RequestCtx) -> Result<Self>
Source§impl<A: PathParam, B: PathParam, C: PathParam> FromRequest for Path<(A, B, C)>
impl<A: PathParam, B: PathParam, C: PathParam> FromRequest for Path<(A, B, C)>
async fn from_request(ctx: &mut RequestCtx) -> Result<Self>
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