pub struct Location {
pub uri: String,
pub range: Range,
pub out_of_workspace: bool,
}Expand description
Location in a document.
Fields§
§uri: StringURI of the document.
range: RangeRange within the document.
out_of_workspace: boolWhether this location is not provably inside any configured workspace root (e.g. the standard library or a crates.io dependency).
Advisory only, not a security/safety guarantee: read-only navigation
results are never filtered by workspace containment (a legitimate
result routinely points into the standard library or a dependency),
so callers that want to apply their own policy toward out-of-workspace
locations can check this flag. The check is purely lexical – it does
not resolve symlinks. A root counts together with the spellings it
was configured or launched under (for example a symlinked path or the
shell’s logical working directory), but a location reached through any
other symlink (e.g. a package manager’s symlinked dependency store)
can read true even though it is genuinely inside the workspace. Also
always true when no workspace roots are configured: without a
configured root, nothing can be vouched for as inside the workspace.
Omitted (defaults to false) when serialized.
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>,
Source§impl JsonSchema for Location
impl JsonSchema for Location
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more