Module multipart
Available on crate features
http and multipart only.Expand description
Server-side multipart/form-data extractor.
Built on top of the [multer] crate. Use Multipart as a handler
argument to iterate over form fields. See the http_multipart example
for usage.
Spec references (vendored under rama-http/specifications/):
- RFC 7578 —
multipart/form-data - RFC 2046 — MIME Part Two: Media Types (boundary framing)
- RFC 6266 / RFC 8187 —
Content-Disposition/ charset-encoded params
Parsing leans accept-friendly: the underlying multer parser accepts
the various non-ASCII filename forms surveyed by RFC 7578 §5.1.3
(raw UTF-8, RFC 2047 encoded-words, RFC 2231 / RFC 8187 ext-value),
tolerates transport padding around boundaries (RFC 2046 §5.1.1), and
ignores preamble and epilogue bytes.
Structs§
- Field
- A single field inside a
Multipartstream. - Invalid
Multipart Boundary - Rejection used when no boundary parameter is present in the
Content-Typeheader (or when the header itself is missing). - Invalid
Multipart Content Type - Rejection used when the
Content-Typeis notmultipart/form-data(e.g.multipart/mixedor another media type entirely). - Multipart
- Extractor for
multipart/form-datarequest bodies. - Multipart
Config - Per-field size constraints for
Multipart. - Multipart
Error - Error type returned while reading a
Multipartfield.
Enums§
- Multipart
Rejection - Rejection type for the
Multipartextractor.