pub struct Query<'a> {
pub file: &'a FilePath,
pub tree: &'a Tree,
pub source: &'a str,
pub node: Node<'a>,
pub files: &'a FileAccess,
}Expand description
One question, with everything answering it needs.
Copy, so an arm can hand the same question to a helper without a clone and without
borrowing itself into a corner.
Fields§
§file: &'a FilePathThe file the question is about, relative to the project root.
A relative specifier resolves against this, so it is load-bearing rather than informational: the same import written in two directories names two files.
tree: &'a TreeThat file’s parse.
source: &'a strThat file’s source, which every byte range in tree indexes.
node: Node<'a>The node asked about. The file’s root for TypeProvider::complete, which asks
about the whole file rather than about a position in it.
files: &'a FileAccessTracked, confined access to the rest of the project.
Every file a provider opens goes through this, hit or miss, so a declaration an answer depended on — including one that was not there — invalidates the asking file’s cache entry when it appears, changes or vanishes. A provider reading the filesystem any other way would compute an answer no cache key covers.