[−][src]Struct tide::body::MultipartForm
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]
&mut self
) -> Result<Option<MultipartField<&mut Multipart<R>>>, Error>
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]
F: FnMut(MultipartField<&mut Multipart<R>>),
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
fn extract(
data: &mut S,
req: &mut Request,
params: &Option<RouteMatch>,
store: &Store
) -> Self::Fut
[src]
data: &mut S,
req: &mut Request,
params: &Option<RouteMatch>,
store: &Store
) -> Self::Fut
impl Deref for MultipartForm
[src]
type Target = Multipart<Cursor<Vec<u8>>>
The resulting type after dereferencing.
fn deref(&self) -> &Multipart<Cursor<Vec<u8>>>
[src]
impl DerefMut for MultipartForm
[src]
Auto Trait Implementations
impl Send for MultipartForm
impl Sync for MultipartForm
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Erased for T
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,