pub struct Multipart<R> { /* fields omitted */ }
The server-side implementation of multipart/form-data
requests.
Implements Borrow<R>
to allow access to the request body, if desired.
If the given HttpRequest
is a multipart/form-data POST request,
return the request body wrapped in the multipart reader. Otherwise,
returns the original request.
Construct a new Multipart
with the given body reader and boundary.
This will prepend the requisite --
to the boundary string as documented in
IETF RFC 1341, Section 7.2.1: "Multipart: the common syntax".
Simply pass the value of the boundary
key from the Content-Type
header in the
request (or use Multipart::from_request()
, if supported).
Read the next entry from this multipart request, returning a struct with the field's name and
data. See MultipartField
for more info.
If the previously returned entry had contents of type MultipartField::File
,
calling this again will discard any unread contents of that entry.
Read the next entry from this multipart request, returning a struct with the field's name and
data. See MultipartField
for more info.
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.
Get a builder type for saving the files in this request to the filesystem.
See SaveBuilder
for more information.
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T> Typeable for T where T: Any, | |
Get the TypeId
of this object.
impl<T> UnsafeAny for T where T: Any, | |