pub struct Location<R = Range<usize>> {
pub uri: Arc<str>,
pub range: R,
}Expand description
Represents a location inside a resource. Can be either byte-based (Rust model) or line/column based (LSP model).
Fields§
§uri: Arc<str>The URI of the resource.
range: RThe range within the resource.
Trait Implementations§
Source§impl<'de, R> Deserialize<'de> for Location<R>where
R: Deserialize<'de>,
impl<'de, R> Deserialize<'de> for Location<R>where
R: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Location<R>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Location<R>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LocationRange> for Location
impl From<LocationRange> for Location
Source§fn from(loc: LocationRange) -> Location
fn from(loc: LocationRange) -> Location
Converts to this type from the input type.
Source§impl<R> Serialize for Location<R>where
R: Serialize,
impl<R> Serialize for Location<R>where
R: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<R> Eq for Location<R>where
R: Eq,
impl<R> StructuralPartialEq for Location<R>
Auto Trait Implementations§
impl<R> Freeze for Location<R>where
R: Freeze,
impl<R> RefUnwindSafe for Location<R>where
R: RefUnwindSafe,
impl<R> Send for Location<R>where
R: Send,
impl<R> Sync for Location<R>where
R: Sync,
impl<R> Unpin for Location<R>where
R: Unpin,
impl<R> UnwindSafe for Location<R>where
R: UnwindSafe,
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