pub struct FileLineCol {
pub uri: Uri,
pub line: LineNumber,
pub column: ColumnNumber,
}
Expand description
A FileLineCol represents traditional file/line/column information for use in rendering.
Fields§
§uri: Uri
The path to the source file in which the relevant source code can be found
line: LineNumber
The one-indexed number of the line to which this location refers
column: ColumnNumber
The one-indexed column of the line on which this location starts
Implementations§
Source§impl FileLineCol
impl FileLineCol
Sourcepub fn new(
uri: impl Into<Uri>,
line: impl Into<LineNumber>,
column: impl Into<ColumnNumber>,
) -> Self
pub fn new( uri: impl Into<Uri>, line: impl Into<LineNumber>, column: impl Into<ColumnNumber>, ) -> Self
Creates a new Location.
Sourcepub const fn line(&self) -> LineNumber
pub const fn line(&self) -> LineNumber
Returns the line of the location.
Sourcepub fn move_column(&mut self, offset: i32)
pub fn move_column(&mut self, offset: i32)
Moves the column by the given offset.
Trait Implementations§
Source§impl Clone for FileLineCol
impl Clone for FileLineCol
Source§fn clone(&self) -> FileLineCol
fn clone(&self) -> FileLineCol
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FileLineCol
impl Debug for FileLineCol
Source§impl<'de> Deserialize<'de> for FileLineCol
impl<'de> Deserialize<'de> for FileLineCol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FileLineCol
impl Display for FileLineCol
Source§impl Hash for FileLineCol
impl Hash for FileLineCol
Source§impl Ord for FileLineCol
impl Ord for FileLineCol
Source§fn cmp(&self, other: &FileLineCol) -> Ordering
fn cmp(&self, other: &FileLineCol) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FileLineCol
impl PartialEq for FileLineCol
Source§impl PartialOrd for FileLineCol
impl PartialOrd for FileLineCol
Source§impl Serialize for FileLineCol
impl Serialize for FileLineCol
impl Eq for FileLineCol
impl StructuralPartialEq for FileLineCol
Auto Trait Implementations§
impl Freeze for FileLineCol
impl RefUnwindSafe for FileLineCol
impl Send for FileLineCol
impl Sync for FileLineCol
impl Unpin for FileLineCol
impl UnwindSafe for FileLineCol
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