Struct gluon_base::pos::Line [−][src]
pub struct Line(pub u32);
Expand description
A zero-indexed line offset into a source file
Tuple Fields
0: u32
Implementations
The 1-indexed line number. Useful for pretty printing source locations.
use codespan::{LineIndex, LineNumber};
assert_eq!(format!("{}", LineIndex(0).number()), "1");
assert_eq!(format!("{}", LineIndex(3).number()), "4");
Trait Implementations
Performs the +=
operation. Read more
type Offset = LineOffset
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type Output = LineOffset
type Output = LineOffset
The resulting type after applying the -
operator.
Performs the -
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for LineIndex
impl UnwindSafe for LineIndex
Blanket Implementations
Mutably borrows from an owned value. Read more