pub struct State<'i> {
pub input: &'i str,
pub pos: Pos,
pub n: i32,
pub c: Context,
}Expand description
Immutable parser state threaded through every combinator.
State borrows the input slice for the lifetime 'i. Positions in the
slice are tracked via pos; n and c carry the YAML context parameters
(indentation level and context mode) through combinator composition.
Fields§
§input: &'i strRemaining (unconsumed) input.
pos: PosPosition of the first byte of input within the original document.
n: i32Indentation level n (YAML spec parameter).
c: ContextContext mode c (YAML spec parameter).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'i> Freeze for State<'i>
impl<'i> RefUnwindSafe for State<'i>
impl<'i> Send for State<'i>
impl<'i> Sync for State<'i>
impl<'i> Unpin for State<'i>
impl<'i> UnsafeUnpin for State<'i>
impl<'i> UnwindSafe for State<'i>
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