pub struct State {
pub state: u8,
pub start: usize,
pub cursor: usize,
}Expand description
Progress of a resumable parse, used by the parse_with_state methods.
Start with State::default() and pass the same State again, with the
same (possibly grown) buffer, after a Status::Partial result. Reset it
to default before parsing the next item from a different buffer position.
The fields are internal bookkeeping and should not be changed by callers.
Fields§
§state: u8Parser specific step.
start: usizeStart of the part being parsed.
cursor: usizePosition of the next byte to parse.
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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