pub struct SessionStore { /* private fields */ }Implementations§
Source§impl SessionStore
impl SessionStore
pub fn new() -> Result<Self, SessionStoreError>
pub fn from_path(dir: PathBuf) -> Self
pub fn append_meta( &self, session_id: &str, meta: &SessionMeta, ) -> Result<(), SessionStoreError>
pub fn append_event( &self, session_id: &str, event: &SessionEvent, ) -> Result<(), SessionStoreError>
pub fn load( &self, session_id: &str, ) -> Result<(SessionMeta, Vec<SessionEvent>), SessionStoreError>
pub fn session_cwd(&self, session_id: &str) -> Option<PathBuf>
Sourcepub fn relocate(
&self,
session_id: &str,
new_cwd: &Path,
) -> Result<(), SessionStoreError>
pub fn relocate( &self, session_id: &str, new_cwd: &Path, ) -> Result<(), SessionStoreError>
Rewrites the session’s recorded working directory to new_cwd, updating the
metadata line and any matching prompt-history entries. Event lines are left
unchanged.
pub fn rebuild_prompt_history(&self) -> Result<(), SessionStoreError>
pub fn list(&self) -> Vec<SessionSummary>
pub fn preview( &self, session_id: &str, ) -> Result<SessionPreviewResponse, SessionStoreError>
pub fn search_prompts( &self, query: &str, limit: Option<usize>, ) -> Result<PromptSearchResponse, SessionStoreError>
Auto Trait Implementations§
impl !Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
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
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.