Enum multipart::server::MultipartData [] [src]

pub enum MultipartData<'a, R: 'a> {
    Text(&'a str),
    File(MultipartFile<'a, R>),
}

The data of a field in a multipart/form-data request.

Variants

Text(&'a str)

The field's payload is a text string.

File(MultipartFile<'a, R>)

The field's payload is a binary stream (file).

Methods

impl<'a, R> MultipartData<'a, R>
[src]

fn as_text(&self) -> Option<&str>

Borrow this payload as a text field, if possible.

fn as_file(&mut self) -> Option<&mut MultipartFile<'a, R>>

Borrow this payload as a file field, if possible. Mutably borrows so the contents can be read.

Trait Implementations

impl<'a, R: Debug + 'a> Debug for MultipartData<'a, R>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.