Function rustc_incremental::persist::file_format::read_file [−][src]
pub fn read_file(
report_incremental_info: bool,
path: &Path
) -> Result<Option<(Vec<u8>, usize)>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Reads the contents of a file with a file header as defined in this module.
- Returns
Ok(Some(data, pos))if the file existed and was generated by a compatible compiler version.datais the entire contents of the file andpospoints to the first byte after the header. - Returns
Ok(None)if the file did not exist or was generated by an incompatible version of the compiler. - Returns
Err(..)if some kind of IO error occurred while reading the file.