pub struct ConversationReader;Implementations§
Source§impl ConversationReader
impl ConversationReader
pub fn read_conversation<P: AsRef<Path>>(path: P) -> Result<Conversation>
pub fn read_conversation_metadata<P: AsRef<Path>>( path: P, ) -> Result<ConversationMetadata>
pub fn read_history<P: AsRef<Path>>(path: P) -> Result<Vec<HistoryEntry>>
Sourcepub fn read_from_offset<P: AsRef<Path>>(
path: P,
byte_offset: u64,
) -> Result<(Vec<ConversationEntry>, u64)>
pub fn read_from_offset<P: AsRef<Path>>( path: P, byte_offset: u64, ) -> Result<(Vec<ConversationEntry>, u64)>
Read conversation entries starting from a byte offset. Returns the new entries and the new byte offset (end of file position).
This is used for incremental reading - call with offset=0 initially, then use the returned offset for subsequent calls to only read new entries.
Auto Trait Implementations§
impl Freeze for ConversationReader
impl RefUnwindSafe for ConversationReader
impl Send for ConversationReader
impl Sync for ConversationReader
impl Unpin for ConversationReader
impl UnsafeUnpin for ConversationReader
impl UnwindSafe for ConversationReader
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