pub struct Location<'pr> { /* private fields */ }Expand description
A range in the source file, represented as a start offset and length.
Implementations§
Source§impl<'pr> Location<'pr>
impl<'pr> Location<'pr>
Sourcepub const fn start(&self) -> u32
pub const fn start(&self) -> u32
Returns the start offset from the beginning of the parsed source.
Source§impl Location<'_>
impl Location<'_>
Sourcepub fn start_line(&self) -> i32
pub fn start_line(&self) -> i32
Returns the line number where this location starts.
Sourcepub fn start_column(&self) -> u32
pub fn start_column(&self) -> u32
Returns the column number in bytes where this location starts from the start of the line.
Sourcepub fn end_column(&self) -> u32
pub fn end_column(&self) -> u32
Returns the column number in bytes where this location ends from the start of the line.
Trait Implementations§
Auto Trait Implementations§
impl<'pr> Freeze for Location<'pr>
impl<'pr> RefUnwindSafe for Location<'pr>
impl<'pr> !Send for Location<'pr>
impl<'pr> !Sync for Location<'pr>
impl<'pr> Unpin for Location<'pr>
impl<'pr> UnwindSafe for Location<'pr>
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