pub struct EventLog { /* private fields */ }Expand description
A long-lived writer for one run’s events.jsonl.
The file handle is kept open for the lifetime of the EventLog so
appends avoid the per-call open + fsync parent-dir overhead.
Only appends are performed; readers go through the free
read_run function and open the file fresh.
Implementations§
Source§impl EventLog
impl EventLog
Sourcepub fn for_run(volume_root: &Path, run_id: &str) -> Result<Self, Error>
pub fn for_run(volume_root: &Path, run_id: &str) -> Result<Self, Error>
Open (or create) the per-run log at
.omne/var/runs/<run_id>/events.jsonl. Parent directories are
created on demand.
Auto Trait Implementations§
impl !Freeze for EventLog
impl RefUnwindSafe for EventLog
impl Send for EventLog
impl Sync for EventLog
impl Unpin for EventLog
impl UnsafeUnpin for EventLog
impl UnwindSafe for EventLog
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more