[][src]Struct cssparser::SourceLocation

pub struct SourceLocation {
    pub line: u32,
    pub column: u32,
}

The line and column number for a given position within the input.

Fields

line: u32

The line number, starting at 0 for the first line, unless with_first_line_number was used.

column: u32

The column number within a line, starting at 1 for first the character of the line. Column numbers are counted in UTF-16 code units.

Methods

impl SourceLocation[src]

pub fn new_basic_unexpected_token_error<'i>(
    self,
    token: Token<'i>
) -> BasicParseError<'i>
[src]

Create a new BasicParseError at this location for an unexpected token

pub fn new_unexpected_token_error<'i, E>(
    self,
    token: Token<'i>
) -> ParseError<'i, E>
[src]

Create a new ParseError at this location for an unexpected token

pub fn new_custom_error<'i, E1: Into<E2>, E2>(
    self,
    error: E1
) -> ParseError<'i, E2>
[src]

Create a new custom ParseError at this location

Trait Implementations

impl Clone for SourceLocation[src]

impl Copy for SourceLocation[src]

impl Eq for SourceLocation[src]

impl PartialEq<SourceLocation> for SourceLocation[src]

impl Debug for SourceLocation[src]

impl StructuralPartialEq for SourceLocation[src]

impl StructuralEq for SourceLocation[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]