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 (see
bridge::uri_in_workspace_roots’s docs for why), so callers that
want to apply their own policy toward out-of-workspace locations can
check this flag. The underlying check is purely lexical – it does
not resolve symlinks – so a location reached through a symlinked
workspace root (e.g. macOS’s /var -> /private/var, or 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, consistent with
bridge::uri_in_workspace_roots’s fail-closed convention: 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