#[non_exhaustive]pub enum Event<'p> {
PartStart(PartHead<'p>),
Data(&'p [u8]),
PartEnd(PartSummary),
End,
NeedInput,
}Expand description
What the parser found.
Per part the order is always PartStart, any number of Data (none for
an empty part), PartEnd. A Data slice is never empty. After the last
part comes End. NeedInput can appear anywhere between.
Debug prints the length of Data, never the bytes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PartStart(PartHead<'p>)
A part’s headers were read and checked.
Data(&'p [u8])
Bytes of the current part’s data.
PartEnd(PartSummary)
The current part ended.
End
The close delimiter was read: the form is complete.
NeedInput
Every byte given was consumed; give more.
Trait Implementations§
Auto Trait Implementations§
impl<'p> Freeze for Event<'p>
impl<'p> RefUnwindSafe for Event<'p>
impl<'p> Send for Event<'p>
impl<'p> Sync for Event<'p>
impl<'p> Unpin for Event<'p>
impl<'p> UnsafeUnpin for Event<'p>
impl<'p> UnwindSafe for Event<'p>
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