Enum form_data::Value[][src]

pub enum Value {
    Map(HashMap<String, Value>),
    Array(Vec<Value>),
    File(StringPathBuf),
    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

Trait Implementations

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Value
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Value
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Value

impl Sync for Value