pub enum MultipartEvent<'a> {
Part(PartHead<'a>),
Content(&'a [u8]),
PartEnd,
End,
Incomplete,
}Expand description
One step through a multipart body, borrowed from the parser’s input.
A body produces, for each part, Part, any number of Content, then PartEnd, and finally End.
Variants§
Part(PartHead<'a>)
A part begins, with its header section.
Content(&'a [u8])
Some of the current part’s content. A part’s content may arrive in any number of pieces.
PartEnd
The current part’s content is complete.
End
The closing boundary was reached. Anything after it, the epilogue, is ignored.
Incomplete
The input ends before the next event: call again with more input, beginning with the bytes not yet consumed.
Trait Implementations§
Source§impl<'a> Clone for MultipartEvent<'a>
impl<'a> Clone for MultipartEvent<'a>
impl<'a> Copy for MultipartEvent<'a>
Source§impl Debug for MultipartEvent<'_>
Shows the length of content rather than its bytes, since content such as a password field must not reach logs.
impl Debug for MultipartEvent<'_>
Shows the length of content rather than its bytes, since content such as a password field must not reach logs.
impl<'a> Eq for MultipartEvent<'a>
Source§impl<'a> PartialEq for MultipartEvent<'a>
impl<'a> PartialEq for MultipartEvent<'a>
impl<'a> StructuralPartialEq for MultipartEvent<'a>
Auto Trait Implementations§
impl<'a> Forget for MultipartEvent<'a>
impl<'a> Freeze for MultipartEvent<'a>
impl<'a> RefUnwindSafe for MultipartEvent<'a>
impl<'a> Send for MultipartEvent<'a>
impl<'a> Sync for MultipartEvent<'a>
impl<'a> Unpin for MultipartEvent<'a>
impl<'a> UnsafeUnpin for MultipartEvent<'a>
impl<'a> UnwindSafe for MultipartEvent<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more