pub struct EventHistory { /* private fields */ }Expand description
Reader for event history files.
Implementations§
Source§impl EventHistory
impl EventHistory
Sourcepub fn default_path() -> Self
pub fn default_path() -> Self
Creates a reader for the default path.
Sourcepub fn from_context(context: &LoopContext) -> Self
pub fn from_context(context: &LoopContext) -> Self
Creates a history reader using the events path from a LoopContext.
This ensures the reader looks in the correct location when running in a worktree or other isolated workspace.
Sourcepub fn read_all(&self) -> Result<Vec<EventRecord>>
pub fn read_all(&self) -> Result<Vec<EventRecord>>
Reads all event records from the file.
Sourcepub fn filter_by_topic(&self, topic: &str) -> Result<Vec<EventRecord>>
pub fn filter_by_topic(&self, topic: &str) -> Result<Vec<EventRecord>>
Reads events filtered by topic.
Sourcepub fn filter_by_iteration(&self, iteration: u32) -> Result<Vec<EventRecord>>
pub fn filter_by_iteration(&self, iteration: u32) -> Result<Vec<EventRecord>>
Reads events filtered by iteration.
Auto Trait Implementations§
impl Freeze for EventHistory
impl RefUnwindSafe for EventHistory
impl Send for EventHistory
impl Sync for EventHistory
impl Unpin for EventHistory
impl UnsafeUnpin for EventHistory
impl UnwindSafe for EventHistory
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