pub struct Multipart { /* private fields */ }
Available on crate feature
multipart
only.Expand description
Struct used to parse a multipart body into fields. In Saphir 4.0.0, this will have a lifetime
Implementations§
source§impl Multipart
impl Multipart
sourcepub fn from_part<S>(boundary: String, stream: S) -> Selfwhere
S: Stream<Item = Result<Bytes, MultipartError>> + Send + Sync + Unpin + 'static,
pub fn from_part<S>(boundary: String, stream: S) -> Selfwhere S: Stream<Item = Result<Bytes, MultipartError>> + Send + Sync + Unpin + 'static,
Initialize the Multipart from raw parts, for convenience, Multipart implement the FromRequest trait, from_request() should be used instead
sourcepub async fn next_field(&self) -> Result<Option<Field<'static>>, MultipartError>
pub async fn next_field(&self) -> Result<Option<Field<'static>>, MultipartError>
Yields the next [MultipartField
] if available.
Any previous Field
returned by this method must be dropped before
calling this method or [Multipart::next_field_with_idx()
] again. See
field-exclusivity for details.