pub enum Event<'i, 'p> {
PartStart,
Header {
name: &'p [u8],
value: &'p [u8],
},
HeadersEnd,
Data(&'i [u8]),
PartEnd,
Finished,
}Expand description
One parse event. 'i is the lifetime of the input slice passed to
Parser::parse, 'p the borrow of the parser.
Variants§
PartStart
A part delimiter was consumed; headers follow.
Header
One header line of the current part. Both slices borrow the parser’s line buffer and are valid until the next call.
Fields
HeadersEnd
The empty line after the headers; body data follows.
Data(&'i [u8])
A non-empty sub-slice of input belonging to the current part body.
PartEnd
The body of the current part is complete.
Finished
The close delimiter was consumed. Every later call returns this again.
Trait Implementations§
impl<'i, 'p> Copy for Event<'i, 'p>
impl<'i, 'p> Eq for Event<'i, 'p>
impl<'i, 'p> StructuralPartialEq for Event<'i, 'p>
Auto Trait Implementations§
impl<'i, 'p> Freeze for Event<'i, 'p>
impl<'i, 'p> RefUnwindSafe for Event<'i, 'p>
impl<'i, 'p> Send for Event<'i, 'p>
impl<'i, 'p> Sync for Event<'i, 'p>
impl<'i, 'p> Unpin for Event<'i, 'p>
impl<'i, 'p> UnsafeUnpin for Event<'i, 'p>
impl<'i, 'p> UnwindSafe for Event<'i, '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