Enum actix_form_data::Value[][src]

pub enum Value {
    Map(HashMap<String, Value>),
    Array(Vec<Value>),
    File(FileMeta),
    Bytes(Bytes),
    Text(String),
    Int(i64),
    Float(f64),
}
Expand description

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

Array(Vec<Value>)
File(FileMeta)
Bytes(Bytes)
Text(String)
Int(i64)
Float(f64)

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

The associated error which can be returned.

Future that resolves to a Self.

Configuration for this extractor.

Create a Self from request parts asynchronously.

Create a Self from request head asynchronously. Read more

Create and configure config instance.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.