A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/source_map/trait.FileLoader.html below:

FileLoader in rustc_span::source_map - Rust

pub trait FileLoader {
    // Required methods
    fn file_exists(&self, path: &Path) -> bool;
    fn read_file(&self, path: &Path) -> Result<String>;
    fn read_binary_file(&self, path: &Path) -> Result<Arc<[u8]>>;
}
Expand description

An abstraction over the fs operations used by the Parser.

Source

Query the existence of a file.

Source

Read the contents of a UTF-8 file into memory. This function must return a String because we normalize source files, which may require resizing.

Source

Read the contents of a potentially non-UTF-8 file into memory. We don’t normalize binary files, so we can start in an Arc.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4