pub struct EventReader { /* private fields */ }Expand description
Reads new events from .ralph/events.jsonl since last read.
Implementations§
Source§impl EventReader
impl EventReader
Sourcepub fn read_new_events(&mut self) -> Result<ParseResult>
pub fn read_new_events(&mut self) -> Result<ParseResult>
Reads new events since the last read.
Returns a ParseResult containing both successfully parsed events
and information about malformed lines. This enables backpressure
validation - the caller can emit event.malformed events and
track consecutive failures.
§Errors
Returns an error if the file cannot be opened or read.
Sourcepub fn peek_new_events(&self) -> Result<ParseResult>
pub fn peek_new_events(&self) -> Result<ParseResult>
Reads new events without advancing the internal file position.
This is used by callers that need to inspect unread events before deciding whether to process them.
Auto Trait Implementations§
impl Freeze for EventReader
impl RefUnwindSafe for EventReader
impl Send for EventReader
impl Sync for EventReader
impl Unpin for EventReader
impl UnsafeUnpin for EventReader
impl UnwindSafe for EventReader
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