[][src]Struct tide::body::MultipartForm

pub struct MultipartForm(pub Multipart<Cursor<Vec<u8>>>);

A wrapper for multipart form

This type is useable as an extractor (argument to an endpoint) for getting a Multipart type defined in the multipart crate

Methods from Deref<Target = Multipart<Cursor<Vec<u8>>>>

pub fn read_entry(
    &mut self
) -> Result<Option<MultipartField<&mut Multipart<R>>>, Error>
[src]

Read the next entry from this multipart request, returning a struct with the field's name and data. See MultipartField for more info.

Warning: Risk of Data Loss

If the previously returned entry had contents of type MultipartField::File, calling this again will discard any unread contents of that entry.

pub fn foreach_entry<F>(&mut self, foreach: F) -> Result<(), Error> where
    F: FnMut(MultipartField<&mut Multipart<R>>), 
[src]

Call f for each entry in the multipart request.

This is a substitute for Rust not supporting streaming iterators (where the return value from next() borrows the iterator for a bound lifetime).

Returns Ok(()) when all fields have been read, or the first error.

pub fn save(&mut self) -> SaveBuilder<&mut Multipart<R>>[src]

Get a builder type for saving the files in this request to the filesystem.

See SaveBuilder for more information.

Trait Implementations

impl<S: 'static> Extract<S> for MultipartForm[src]

type Fut = FutureObj<'static, Result<Self, Response>>

The async result of extract. Read more

impl Deref for MultipartForm[src]

type Target = Multipart<Cursor<Vec<u8>>>

The resulting type after dereferencing.

impl DerefMut for MultipartForm[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]