[−][src]Trait ra_ap_base_db::FileLoader
Required methods
fn file_text(&self, file_id: FileId) -> Arc<String>
Text of the file.
fn resolve_path(&self, anchor: FileId, path: &str) -> Option<FileId>
Note that we intentionally accept a &str
and not a &Path
here. This
method exists to handle #[path = "/some/path.rs"] mod foo;
and such,
so the input is guaranteed to be utf-8 string. One might be tempted to
introduce some kind of "utf-8 path with / separators", but that's a bad idea. Behold
#[path = "C://no/way"]