pub struct SessionStore { /* private fields */ }Implementations§
Source§impl SessionStore
impl SessionStore
pub fn ephemeral() -> SessionStore
pub fn open(path: &Path) -> Result<SessionStore, DaemonError>
pub fn create( &mut self, parent: Option<u64>, params: GenParams, ) -> Result<u64, DaemonError>
pub fn fork( &mut self, parent: u64, fork_at: u64, params: Option<GenParams>, ) -> Result<u64, DaemonError>
pub fn append( &mut self, session: u64, text: Option<String>, span: Vec<u32>, ) -> Result<CommittedEvent, DaemonError>
pub fn append_message( &mut self, session: u64, role: u32, text: String, span: Vec<u32>, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_generation_prompt( &mut self, session: u64, span: Vec<u32>, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_use( &mut self, session: u64, name: String, arguments: String, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_result( &mut self, session: u64, call_id: u64, content: String, span: Vec<u32>, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_generated( &mut self, session: u64, span: Vec<u32>, text: String, channel: u32, finish: u32, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_generation_fingerprint( &mut self, session: u64, digest: u64, ) -> Result<Option<CommittedEvent>, DaemonError>
pub fn commit_tool_parse_failure( &mut self, session: u64, raw: String, ) -> Result<CommittedEvent, DaemonError>
pub fn store_id(&self) -> StoreId
pub fn wal_version(&self) -> u8
pub fn bus(&self) -> Arc<SessionBus> ⓘ
pub fn session(&self, id: u64) -> Result<&SessionState, DaemonError>
pub fn tombstone(&self, id: u64) -> Option<&SessionState>
pub fn read( &self, id: u64, cursor: u64, ) -> Result<&[CommittedEvent], DaemonError>
pub fn drop_session(&mut self, id: u64) -> Result<(), DaemonError>
pub fn session_ids(&self) -> Vec<u64>
pub fn set_meta( &mut self, session: u64, expected_version: u64, title: Option<String>, archived: Option<bool>, ) -> Result<u64, DaemonError>
pub fn set_pin( &mut self, session: u64, deadline_unix_ms: u64, ) -> Result<CommittedEvent, DaemonError>
pub fn set_qos( &mut self, session: u64, class: u8, batch_invariant: bool, ) -> Result<CommittedEvent, DaemonError>
pub fn rebase_branch( &mut self, parent: u64, fork_at: u64, params: Option<GenParams>, edits: Vec<RebaseEdit>, ) -> Result<u64, DaemonError>
pub fn commit_block( &mut self, session: u64, role: u32, kind: u32, payload: String, span: Vec<u32>, visibility_version: u32, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_permission_request( &mut self, session: u64, call_id: u64, text: String, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_permission_response( &mut self, session: u64, request_id: u64, granted: bool, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_cancel_request( &mut self, session: u64, call_id: u64, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_outcome( &mut self, session: u64, call_id: u64, outcome: u8, note: String, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_reconciliation( &mut self, session: u64, call_id: u64, note: String, ) -> Result<CommittedEvent, DaemonError>
pub fn commit_tool_lease( &mut self, session: u64, call_id: u64, deadline_unix_ms: u64, ) -> Result<CommittedEvent, DaemonError>
pub fn expire_tool_call( &mut self, session: u64, call_id: u64, reason: &str, ) -> Result<CommittedEvent, DaemonError>
pub fn children_of(&self, session: u64) -> Vec<u64>
pub fn descendants_of(&self, session: u64) -> Vec<u64>
pub fn purge( &mut self, session: u64, expected_generation: u64, mode: PurgeMode, ) -> Result<Vec<u64>, DaemonError>
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
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