Struct lamcal::CharPosition[][src]

pub struct CharPosition { /* fields omitted */ }

Represents a position in a stream of chars.

The first character in a stream is at line 1 and column 1. Every newline character advances the line by 1 and resets the column so that the next character gets column 1 at the next line.

Methods

impl CharPosition
[src]

Constructs a new CharPosition with given line and column number.

Constructs a new CharPosition with given line and column number and an indicator, that the next character is positioned at a new line.

Returns the line number of this position.

Returns the column number of this position.

Returns the newline indicator of this position.

Advances this position to the next character.

The first character in a stream is at line 1 and column 1. Every newline character advances the line by 1 and resets the column so that the next character gets column 1 at the next line.

Trait Implementations

impl Debug for CharPosition
[src]

Formats the value using the given formatter. Read more

impl Clone for CharPosition
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for CharPosition
[src]

impl PartialEq for CharPosition
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for CharPosition
[src]

impl Hash for CharPosition
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for CharPosition
[src]

Returns the "default value" for a type. Read more

impl Display for CharPosition
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations