pub trait DispatchFiles<'a> {
// Required methods
fn file(&'a self, path: &str) -> Option<&'a ParseBlob>;
fn files_with_method(&self, name: &str) -> Vec<String>;
fn files_with_static_type(&self, key: &str) -> Vec<String>;
fn files_in(&self, directory: &str) -> Vec<String>;
fn go_files_requiring(&self, name: &str) -> Vec<String>;
fn import_target(&self, file: &str, module: &str) -> Option<String>;
fn type_target(&self, file: &str, name: &str) -> Option<(String, String)>;
fn associated_site(&self, file: &str, ordinal: u32) -> bool;
// Provided method
fn projections(&'a self) -> Option<&'a (dyn Projections + 'a)> { ... }
}Expand description
What the method-call resolver reads about a checkout’s files, when they are loaded on demand instead of all held in its maps. Each answer must equal what those maps give for the same files.
Required Methods§
Sourcefn files_with_method(&self, name: &str) -> Vec<String>
fn files_with_method(&self, name: &str) -> Vec<String>
Every file with a method named name, in path order. May list a few
that have none; the resolver checks each file’s facts.
Sourcefn files_with_static_type(&self, key: &str) -> Vec<String>
fn files_with_static_type(&self, key: &str) -> Vec<String>
Files declaring a type at the exact qualified name denoted by key.
Sourcefn files_in(&self, directory: &str) -> Vec<String>
fn files_in(&self, directory: &str) -> Vec<String>
Every file with facts directly in directory ("" for the root), in
path order.
Sourcefn go_files_requiring(&self, name: &str) -> Vec<String>
fn go_files_requiring(&self, name: &str) -> Vec<String>
Every Go file whose interfaces require a method named name, in path
order. May list a few that do not.
Sourcefn import_target(&self, file: &str, module: &str) -> Option<String>
fn import_target(&self, file: &str, module: &str) -> Option<String>
The target file of module as file imports it.
Sourcefn type_target(&self, file: &str, name: &str) -> Option<(String, String)>
fn type_target(&self, file: &str, name: &str) -> Option<(String, String)>
The target file and symbol of file’s receiver type name.
Sourcefn associated_site(&self, file: &str, ordinal: u32) -> bool
fn associated_site(&self, file: &str, ordinal: u32) -> bool
Whether file’s reference ordinal is an associated-function call.
Provided Methods§
Sourcefn projections(&'a self) -> Option<&'a (dyn Projections + 'a)>
fn projections(&'a self) -> Option<&'a (dyn Projections + 'a)>
Receiver and owner projections recorded in file order, when this
source serves them: the resolver then replays them instead of
reading imports, fields, returns, targets and directories (see
projected).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".