pub struct SourceLocation {
pub line: u32,
pub column: u32,
pub url: Option<Url>,
}Expand description
Represents a specific location within source code.
This struct provides line and column information for error reporting and debugging, optionally including a URL reference to the source file.
Fields§
§line: u32The 1-based line number in the source text
column: u32The 0-based column number within the line
url: Option<Url>Optional URL reference to the source file
Trait Implementations§
Source§impl Clone for SourceLocation
impl Clone for SourceLocation
Source§fn clone(&self) -> SourceLocation
fn clone(&self) -> SourceLocation
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 SourceLocation
impl Debug for SourceLocation
Source§impl Default for SourceLocation
impl Default for SourceLocation
Source§fn default() -> SourceLocation
fn default() -> SourceLocation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SourceLocation
impl<'de> Deserialize<'de> for SourceLocation
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 Hash for SourceLocation
impl Hash for SourceLocation
Source§impl PartialEq for SourceLocation
impl PartialEq for SourceLocation
Source§impl Serialize for SourceLocation
impl Serialize for SourceLocation
impl Eq for SourceLocation
impl StructuralPartialEq for SourceLocation
Auto Trait Implementations§
impl Freeze for SourceLocation
impl RefUnwindSafe for SourceLocation
impl Send for SourceLocation
impl Sync for SourceLocation
impl Unpin for SourceLocation
impl UnwindSafe for SourceLocation
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