pub struct BuildLog<'a> { /* private fields */ }Expand description
Store a log of every command ran for every build. It has a few uses:
- (hashes of) command lines for existing output files, so we know when we need to rebuild due to the command changing
- timing information, perhaps for generating reports
- restat information
Implementations§
Source§impl<'a> BuildLog<'a>
impl<'a> BuildLog<'a>
pub fn new() -> Self
pub fn open_for_write<User: BuildLogUser>( &self, path: &Path, user: &User, ) -> Result<(), String>
pub fn record_command_without_timestamp( &self, state: &State, edge_idx: EdgeIndex, start_time: u64, end_time: u64, ) -> Result<(), ()>
pub fn record_command( &self, state: &State, edge_idx: EdgeIndex, start_time: u64, end_time: u64, mtime: TimeStamp, ) -> Result<(), ()>
pub fn close(&mut self)
Sourcepub fn lookup_by_output(&self, path: &[u8]) -> Option<&BuildLogEntry>
pub fn lookup_by_output(&self, path: &[u8]) -> Option<&BuildLogEntry>
Lookup a previously-run command by its output path.
Sourcepub fn write_entry<W: Write>(
&self,
f: &W,
entry: &BuildLogEntry,
) -> Result<(), ()>
pub fn write_entry<W: Write>( &self, f: &W, entry: &BuildLogEntry, ) -> Result<(), ()>
Serialize an entry into a log file.
Sourcepub fn recompact<User: BuildLogUser>(
&self,
path: &Path,
user: &User,
) -> Result<(), String>
pub fn recompact<User: BuildLogUser>( &self, path: &Path, user: &User, ) -> Result<(), String>
Rewrite the known log entries, throwing away old data.
pub fn entries(&'a self) -> &'a HashMap<&'a str, &'a BuildLogEntry>
Auto Trait Implementations§
impl<'a> Freeze for BuildLog<'a>
impl<'a> RefUnwindSafe for BuildLog<'a>
impl<'a> Send for BuildLog<'a>
impl<'a> Sync for BuildLog<'a>
impl<'a> Unpin for BuildLog<'a>
impl<'a> UnwindSafe for BuildLog<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more