pub enum ParamType {
String,
Int,
U64,
U32,
F64,
Bool,
StringArray,
Json,
Bytes,
}Expand description
The declared type of a route parameter — governs how its raw string value is parsed before reaching the handler.
Variants§
String
A UTF-8 string.
Int
A signed 64-bit integer (i64).
U64
An unsigned 64-bit integer (u64).
U32
An unsigned 32-bit integer (u32).
F64
A 64-bit float (f64).
Bool
A boolean.
StringArray
A repeated parameter collected into Vec<String>.
Json
A JSON value (serde_json::Value), parsed from the request body.
Bytes
The raw request body as bytes::Bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamType
impl RefUnwindSafe for ParamType
impl Send for ParamType
impl Sync for ParamType
impl Unpin for ParamType
impl UnsafeUnpin for ParamType
impl UnwindSafe for ParamType
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