pub struct MaterializedSessionState { /* private fields */ }Expand description
Deterministic session projection derived only from the append-only record log.
Implementations§
Source§impl MaterializedSessionState
impl MaterializedSessionState
Sourcepub const fn session_id(&self) -> SessionId
pub const fn session_id(&self) -> SessionId
Returns session identity.
Sourcepub const fn tail_sequence(&self) -> SessionSequence
pub const fn tail_sequence(&self) -> SessionSequence
Returns the current authoritative tail sequence.
Sourcepub const fn tail_record_id(&self) -> RecordId
pub const fn tail_record_id(&self) -> RecordId
Returns the current tail record identity.
Sourcepub const fn metadata(&self) -> &ProtocolMetadata
pub const fn metadata(&self) -> &ProtocolMetadata
Returns bounded creation metadata.
Sourcepub const fn configuration(&self) -> &SessionConfiguration
pub const fn configuration(&self) -> &SessionConfiguration
Returns active configuration.
Sourcepub fn messages(&self) -> &[CanonicalMessage]
pub fn messages(&self) -> &[CanonicalMessage]
Returns the active durable transcript.
Sourcepub const fn pending_approvals(&self) -> &BTreeMap<ApprovalId, PendingApproval>
pub const fn pending_approvals(&self) -> &BTreeMap<ApprovalId, PendingApproval>
Returns pending approvals in stable ID order.
Sourcepub const fn tool_calls(&self) -> &BTreeMap<ToolCallId, ToolCallState>
pub const fn tool_calls(&self) -> &BTreeMap<ToolCallId, ToolCallState>
Returns tool-call lifecycle projections in stable ID order.
Sourcepub const fn active_branch_id(&self) -> Option<BranchId>
pub const fn active_branch_id(&self) -> Option<BranchId>
Returns active branch, or None for a legacy unbranched Protocol 1.0 log.
Sourcepub const fn branches(&self) -> &BTreeMap<BranchId, BranchSummary>
pub const fn branches(&self) -> &BTreeMap<BranchId, BranchSummary>
Returns durable branch summaries in stable ID order.
Sourcepub const fn run_recovery(&self) -> &BTreeMap<RunId, RunRecoveryState>
pub const fn run_recovery(&self) -> &BTreeMap<RunId, RunRecoveryState>
Returns provider-run restart diagnostics.
Sourcepub const fn latest_checkpoint(&self) -> Option<&TurnCheckpoint>
pub const fn latest_checkpoint(&self) -> Option<&TurnCheckpoint>
Returns the latest durable turn checkpoint.
Sourcepub const fn latest_compaction(&self) -> Option<&SessionCompaction>
pub const fn latest_compaction(&self) -> Option<&SessionCompaction>
Returns the latest compaction summary without removing original messages.
Trait Implementations§
Source§impl Clone for MaterializedSessionState
impl Clone for MaterializedSessionState
Source§fn clone(&self) -> MaterializedSessionState
fn clone(&self) -> MaterializedSessionState
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 moreSource§impl Debug for MaterializedSessionState
impl Debug for MaterializedSessionState
Source§impl PartialEq for MaterializedSessionState
impl PartialEq for MaterializedSessionState
impl StructuralPartialEq for MaterializedSessionState
Auto Trait Implementations§
impl Freeze for MaterializedSessionState
impl RefUnwindSafe for MaterializedSessionState
impl Send for MaterializedSessionState
impl Sync for MaterializedSessionState
impl Unpin for MaterializedSessionState
impl UnsafeUnpin for MaterializedSessionState
impl UnwindSafe for MaterializedSessionState
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