pub struct TranscriptsIndex { /* private fields */ }Implementations§
Source§impl TranscriptsIndex
impl TranscriptsIndex
Sourcepub async fn open(path: &Path) -> Result<Self>
pub async fn open(path: &Path) -> Result<Self>
Open or create the index DB at path. Idempotent.
pub async fn insert( &self, agent_id: &str, session_id: Uuid, timestamp_unix: i64, role: &str, source_plugin: &str, content: &str, ) -> Result<()>
Sourcepub async fn search(
&self,
agent_id: &str,
query: &str,
limit: usize,
) -> Result<Vec<IndexedHit>>
pub async fn search( &self, agent_id: &str, query: &str, limit: usize, ) -> Result<Vec<IndexedHit>>
FTS5 MATCH search filtered by agent_id. query is escaped as
a single phrase so quotes / special chars in user input cannot
inject FTS operators.
pub async fn count_for_agent(&self, agent_id: &str) -> Result<u64>
Trait Implementations§
Source§impl Clone for TranscriptsIndex
impl Clone for TranscriptsIndex
Source§fn clone(&self) -> TranscriptsIndex
fn clone(&self) -> TranscriptsIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TranscriptsIndex
impl !UnwindSafe for TranscriptsIndex
impl Freeze for TranscriptsIndex
impl Send for TranscriptsIndex
impl Sync for TranscriptsIndex
impl Unpin for TranscriptsIndex
impl UnsafeUnpin for TranscriptsIndex
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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