pub struct ParamDef {
pub name: &'static str,
pub ty: ParamType,
pub source: ParamSource,
pub default: Option<ParamDefault>,
}Expand description
The compile-time description of one route parameter, recorded by the
routes! macro and used to extract and parse it at request time.
Fields§
§name: &'static strThe parameter name.
ty: ParamTypeThe declared type the raw value is parsed into.
source: ParamSourceWhere the value is read from (path, query, or body).
default: Option<ParamDefault>The default applied when the request omits the parameter, if any.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamDef
impl RefUnwindSafe for ParamDef
impl Send for ParamDef
impl Sync for ParamDef
impl Unpin for ParamDef
impl UnsafeUnpin for ParamDef
impl UnwindSafe for ParamDef
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