pub struct Location {
pub file: Arc<str>,
pub line: u32,
pub line_end: u32,
pub col_start: u16,
pub col_end: u16,
}Expand description
Declaration location.
Columns are 0-based Unicode scalar value (code-point) counts, equivalent to
LSP utf-32 position encoding. Convert to UTF-16 code units at the LSP
boundary for clients that do not advertise utf-32 support.
Fields§
§file: Arc<str>§line: u321-based start line.
line_end: u321-based end line (inclusive). Equal to line for single-line spans.
col_start: u160-based Unicode code-point column of the span start.
col_end: u160-based Unicode code-point column of the span end (exclusive).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Location
impl<'de> Deserialize<'de> for Location
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
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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