pub struct SessionSearch { /* private fields */ }Expand description
Session search engine backed by SQLite FTS5.
Implementations§
Source§impl SessionSearch
impl SessionSearch
Sourcepub fn index_session(
&self,
session_id: &str,
title: Option<&str>,
content: &str,
) -> Result<()>
pub fn index_session( &self, session_id: &str, title: Option<&str>, content: &str, ) -> Result<()>
Index a session’s content for full-text search.
Sourcepub fn search(&self, query: &str, limit: usize) -> Result<Vec<SessionHit>>
pub fn search(&self, query: &str, limit: usize) -> Result<Vec<SessionHit>>
Search sessions by query.
Sourcepub fn recent(&self, limit: usize) -> Result<Vec<SessionHit>>
pub fn recent(&self, limit: usize) -> Result<Vec<SessionHit>>
Get recent sessions (no search query).
Sourcepub fn remove_session(&self, session_id: &str) -> Result<bool>
pub fn remove_session(&self, session_id: &str) -> Result<bool>
Delete a session from the index.
Auto Trait Implementations§
impl Freeze for SessionSearch
impl RefUnwindSafe for SessionSearch
impl Send for SessionSearch
impl Sync for SessionSearch
impl Unpin for SessionSearch
impl UnsafeUnpin for SessionSearch
impl UnwindSafe for SessionSearch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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