[−][src]Trait syntax::source_map::FileLoader
⚙️ This is an internal compiler API. (rustc_private
)
This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml
.
An abstraction over the fs operations used by the Parser.
Required methods
fn file_exists(&self, path: &Path) -> bool
⚙️ This is an internal compiler API. (rustc_private
)
This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml
.
Query the existence of a file.
fn abs_path(&self, path: &Path) -> Option<PathBuf>
⚙️ This is an internal compiler API. (rustc_private
)
This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml
.
Returns an absolute path to a file, if possible.
fn read_file(&self, path: &Path) -> Result<String, Error>
⚙️ This is an internal compiler API. (rustc_private
)
This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml
.
Read the contents of an UTF-8 file into memory.