pub struct SessionFileContextsStore { /* private fields */ }Implementations§
Source§impl SessionFileContextsStore
impl SessionFileContextsStore
pub fn new(pool: Arc<Pool<SqliteConnectionManager>>) -> Self
Sourcepub fn store_attachments(
&self,
session_id: &str,
attachments: &[AttachmentRef<'_>],
) -> Result<()>
pub fn store_attachments( &self, session_id: &str, attachments: &[AttachmentRef<'_>], ) -> Result<()>
Store a set of attachment references for a session. Deduplicates by (session_id, file_name, source) — avoids duplicate rows when the same file is attached multiple times in the same session.
Sourcepub fn get_for_session(
&self,
session_id: &str,
) -> Result<Vec<SessionFileContext>>
pub fn get_for_session( &self, session_id: &str, ) -> Result<Vec<SessionFileContext>>
Return all file references stored for a session, ordered by attach time.
Sourcepub fn delete_for_session(&self, session_id: &str) -> Result<usize>
pub fn delete_for_session(&self, session_id: &str) -> Result<usize>
Remove all file contexts for a session (e.g., when the conversation is deleted).
Auto Trait Implementations§
impl Freeze for SessionFileContextsStore
impl !RefUnwindSafe for SessionFileContextsStore
impl Send for SessionFileContextsStore
impl Sync for SessionFileContextsStore
impl Unpin for SessionFileContextsStore
impl UnsafeUnpin for SessionFileContextsStore
impl !UnwindSafe for SessionFileContextsStore
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