pub struct Journal {
pub dir: PathBuf,
/* private fields */
}Expand description
One open journal.
Fields§
§dir: PathBufThe run’s directory.
Implementations§
Source§impl Journal
impl Journal
Sourcepub fn create(
command: &str,
target: &str,
forge: &str,
repo: &str,
) -> Result<Self>
pub fn create( command: &str, target: &str, forge: &str, repo: &str, ) -> Result<Self>
Create the run directory — before any remote mutation — pruning the oldest runs past the cap first.
§Errors
Any filesystem failure; the caller decides whether that refuses the run (apply) or only costs the record (preview and check).
Sourcepub fn scripts_dir(&self) -> PathBuf
pub fn scripts_dir(&self) -> PathBuf
The directory the run’s scripts materialize into.
Sourcepub fn event_line(&mut self, line: &str)
pub fn event_line(&mut self, line: &str)
Append one already-serialized event line.
Sourcepub fn transcript(&mut self, bytes: &[u8])
pub fn transcript(&mut self, bytes: &[u8])
Append raw bytes to the transcript, in arrival order.
Sourcepub fn record_script(&mut self, path: String, sha256: String)
pub fn record_script(&mut self, path: String, sha256: String)
Record one materialized script’s digest.
Sourcepub fn record_secret(
&mut self,
secret: &str,
present: bool,
source: &'static str,
)
pub fn record_secret( &mut self, secret: &str, present: bool, source: &'static str, )
Record one secret’s handling: where the value came from, and how
it reached the forge CLI. A key file is file, because the
environment carried only its path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Journal
impl RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl UnsafeUnpin for Journal
impl UnwindSafe for Journal
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