Enum form_data::Value [−][src]
pub enum Value { Map(HashMap<String, Value>), Array(Vec<Value>), File(String, PathBuf), Text(String), Int(i64), Float(f64), Bytes(Bytes), }
The result of a succesfull parse through a given multipart stream.
This type represents all possible variations in structure of a Multipart Form.
Example usage
match value { Value::Map(mut hashmap) => { match hashmap.remove("field-name") { Some(value) => match value { Value::Int(integer) => println!("{}", integer), _ => (), } None => (), } } _ => (), }
Variants
Map(HashMap<String, Value>)
Array(Vec<Value>)
File(String, PathBuf)
Text(String)
Int(i64)
Float(f64)
Bytes(Bytes)
Trait Implementations
impl Clone for Value
[src]
impl Clone for Value
fn clone(&self) -> Value
[src]
fn clone(&self) -> Value
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Value
[src]
impl Debug for Value
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Value
[src]
impl PartialEq for Value