Enum multipart::server::MultipartData
[−]
[src]
pub enum MultipartData<M: ReadEntry> { Text(MultipartText<M>), File(MultipartFile<M>), Nested(NestedMultipart<M>), }
The data of a field in a multipart/form-data
request.
Variants
Text(MultipartText<M>)
The field's payload is a text string.
File(MultipartFile<M>)
The field's payload is a binary stream (file).
Nested(NestedMultipart<M>)
The field's payload is a nested multipart body (multiple files).
Methods
impl<M: ReadEntry> MultipartData<M>
[src]
fn as_text(&self) -> Option<&str>
Borrow this payload as a text field, if possible.
fn as_file(&mut self) -> Option<&mut MultipartFile<M>>
Borrow this payload as a file field, if possible. Mutably borrows so the contents can be read.
fn into_inner(self) -> M
Return the inner Multipart
.