pub struct SummaryStore { /* private fields */ }Expand description
Manages summary storage and retrieval
Implementations§
Source§impl SummaryStore
impl SummaryStore
Sourcepub fn new(pool: Arc<Pool<SqliteConnectionManager>>) -> Self
pub fn new(pool: Arc<Pool<SqliteConnectionManager>>) -> Self
Create a new summary store
Sourcepub fn store_summary(&self, summary: &Summary) -> Result<()>
pub fn store_summary(&self, summary: &Summary) -> Result<()>
Store a summary
Sourcepub fn get_session_summaries(&self, session_id: &str) -> Result<Vec<Summary>>
pub fn get_session_summaries(&self, session_id: &str) -> Result<Vec<Summary>>
Get summaries for a session
Sourcepub fn get_summary_for_range(
&self,
session_id: &str,
start: i32,
end: i32,
) -> Result<Option<Summary>>
pub fn get_summary_for_range( &self, session_id: &str, start: i32, end: i32, ) -> Result<Option<Summary>>
Get summary for a specific message range
Sourcepub fn update_summary(&self, summary: &Summary) -> Result<()>
pub fn update_summary(&self, summary: &Summary) -> Result<()>
Update an existing summary
Sourcepub fn delete_session_summaries(&self, session_id: &str) -> Result<usize>
pub fn delete_session_summaries(&self, session_id: &str) -> Result<usize>
Delete summaries for a session
Auto Trait Implementations§
impl Freeze for SummaryStore
impl !RefUnwindSafe for SummaryStore
impl Send for SummaryStore
impl Sync for SummaryStore
impl Unpin for SummaryStore
impl UnsafeUnpin for SummaryStore
impl !UnwindSafe for SummaryStore
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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