pub enum ParseStep {
NeedMore {
consumed: usize,
},
HeaderDone {
consumed: usize,
},
Error {
consumed: usize,
},
}Expand description
Result of a single DnodeParser::step invocation.
Variants§
NeedMore
More bytes are required to advance the state machine. The
consumed field records how many of the input bytes the
parser already absorbed.
HeaderDone
The header (up to and including the trailing LF) has been
parsed. The consumed field records the offset just past
the LF, so the caller can read the payload starting at that
index.
Error
The parser hit an unrecoverable bad byte. The caller should
drop the buffer (or split it at consumed) and reset.
Trait Implementations§
impl Copy for ParseStep
impl Eq for ParseStep
impl StructuralPartialEq for ParseStep
Auto Trait Implementations§
impl Freeze for ParseStep
impl RefUnwindSafe for ParseStep
impl Send for ParseStep
impl Sync for ParseStep
impl Unpin for ParseStep
impl UnsafeUnpin for ParseStep
impl UnwindSafe for ParseStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.