Struct cssparser::ParserState
source · pub struct ParserState { /* private fields */ }
Expand description
A capture of the internal state of a Parser
(including the position within the input),
obtained from the Parser::position
method.
Can be used with the Parser::reset
method to restore that state.
Should only be used with the Parser
instance it came from.
Implementations§
source§impl ParserState
impl ParserState
sourcepub fn position(&self) -> SourcePosition
pub fn position(&self) -> SourcePosition
The position from the start of the input, counted in UTF-8 bytes.
sourcepub fn source_location(&self) -> SourceLocation
pub fn source_location(&self) -> SourceLocation
The line number and column number
Trait Implementations§
source§impl Clone for ParserState
impl Clone for ParserState
source§fn clone(&self) -> ParserState
fn clone(&self) -> ParserState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ParserState
impl Send for ParserState
impl Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
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