pub enum Value {
Null,
Boolean(bool),
I64(i64),
U64(u64),
F64(f64),
String(String),
File(File),
Array(Vec<Value>),
Map(Map),
}Expand description
A representation of all possible types of request parameters.
Variants§
Null
A null from the request’s JSON body.
Boolean(bool)
A true or false from the request’s JSON body.
I64(i64)
A signed integer from the request’s JSON body.
U64(u64)
An unsigned integer from the request’s JSON body.
F64(f64)
A floating point number from the request’s JSON body.
String(String)
Either a string from the request’s JSON body or a plain text value from the request’s URL
(GET) parameters, application/x-www-form-urlencoded parameters, or multipart/form-data
parameters.
File(File)
A temporary file processed from a multipart/form-data request.
Array(Vec<Value>)
Either an array of JSON values or an amalgamation of URL (GET) parameters,
application/x-www-form-urlencoded parameters, or multipart/form-data parameters. Such
parameters should be in the form my_list[]=1&my_list[]=2 to be processed into this
variant.
Map(Map)
Either an object of JSON keys and values or an amalgamation of URL (GET) parameters,
application/x-www-form-urlencoded parameters, or multipart/form-data parameters. Such
parameters should be in the form my_map[x]=1&my_map[y]=2 to be processed into this
variant.
Trait Implementations§
Source§impl FromValue for Value
impl FromValue for Value
Source§fn from_value(value: &Value) -> Option<Self>
fn from_value(value: &Value) -> Option<Self>
Some if the conversion was successful, None otherwise.impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
Source§impl<T> PersistentInto<Arc<Mutex<T>>> for T
impl<T> PersistentInto<Arc<Mutex<T>>> for T
Source§fn persistent_into(self) -> Arc<Mutex<T>>
fn persistent_into(self) -> Arc<Mutex<T>>
self into a value of type T.Source§impl<T> PersistentInto<Arc<RwLock<T>>> for T
impl<T> PersistentInto<Arc<RwLock<T>>> for T
Source§fn persistent_into(self) -> Arc<RwLock<T>>
fn persistent_into(self) -> Arc<RwLock<T>>
self into a value of type T.Source§impl<T> PersistentInto<Arc<T>> for T
impl<T> PersistentInto<Arc<T>> for T
Source§fn persistent_into(self) -> Arc<T>
fn persistent_into(self) -> Arc<T>
self into a value of type T.Source§impl<T> PersistentInto<T> for T
impl<T> PersistentInto<T> for T
Source§fn persistent_into(self) -> T
fn persistent_into(self) -> T
self into a value of type T.