pub struct TraceWriter { /* private fields */ }Expand description
Implementations§
Source§impl TraceWriter
impl TraceWriter
Sourcepub fn new(sessions_root: PathBuf, extras: TraceExtras) -> TraceWriter
pub fn new(sessions_root: PathBuf, extras: TraceExtras) -> TraceWriter
A writer that will place rollouts under sessions_root (usually
<locode home>/sessions). Nothing touches the disk until Init.
Sourcepub fn resume(
path: PathBuf,
sessions_root: PathBuf,
) -> Result<TraceWriter, String>
pub fn resume( path: PathBuf, sessions_root: PathBuf, ) -> Result<TraceWriter, String>
Reopen an existing rollout for appending (--continue/--resume,
ADR-0024 §2.5): the torn tail is healed, and the session’s Init
re-emission is ignored — the header and history are already on disk;
only newly appended messages land (codex’s reopen-for-append).
§Errors
When the file cannot be opened for appending.
Sourcepub fn on_event(&mut self, event: &Event)
pub fn on_event(&mut self, event: &Event)
Feed one engine event. Never fails — on the first IO error the writer
disables itself (fetch the message via Self::take_error).
Sourcepub fn take_error(&mut self) -> Option<String>
pub fn take_error(&mut self) -> Option<String>
The first IO error, if tracing failed (the caller surfaces it as a warning).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraceWriter
impl RefUnwindSafe for TraceWriter
impl Send for TraceWriter
impl Sync for TraceWriter
impl Unpin for TraceWriter
impl UnsafeUnpin for TraceWriter
impl UnwindSafe for TraceWriter
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