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
sourceimpl 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
sourceimpl Clone for ParserState
impl Clone for ParserState
sourcefn clone(&self) -> ParserState
fn clone(&self) -> ParserState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ParserState
impl Send for ParserState
impl Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more