Function rustc_incremental::persist::file_format::read_file
source · pub fn read_file(
report_incremental_info: bool,
path: &Path,
nightly_build: bool
) -> Result<Option<(Mmap, usize)>>
Expand description
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.data
is the entire contents of the file andpos
points 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.