pub struct ProviderTranscriptState { /* private fields */ }Expand description
Durable native transcript state. Only groups in the active family and current epoch are replayable; earlier epochs remain persisted for audit and normalized fallback but can never cross a provider switch.
Implementations§
Source§impl ProviderTranscriptState
impl ProviderTranscriptState
pub fn is_empty(&self) -> bool
pub fn state_revision(&self) -> u64
pub fn epoch(&self) -> u64
pub fn active_family(&self) -> Option<ProviderFamily>
pub fn active_protocol(&self) -> Option<ProviderProtocol>
pub fn active_provider_boundary_sha256(&self) -> Option<&str>
pub fn last_reset_reason(&self) -> Option<ProviderTranscriptResetReason>
pub fn groups(&self) -> &[ProviderTranscriptGroup]
Sourcepub fn activate_route(
&mut self,
family: ProviderFamily,
protocol: ProviderProtocol,
provider_boundary_sha256: &str,
) -> Result<bool, ProviderTranscriptError>
pub fn activate_route( &mut self, family: ProviderFamily, protocol: ProviderProtocol, provider_boundary_sha256: &str, ) -> Result<bool, ProviderTranscriptError>
Select the exact provider route for the next request. A family, protocol, or same-family instance switch starts a new replay epoch, making every older provider-minted item unreachable.
Sourcepub fn deactivate_route(&mut self) -> bool
pub fn deactivate_route(&mut self) -> bool
Leave native replay when a session moves to a provider family Bamboo cannot identify. Older items remain auditable but the new epoch has no family capable of replaying them.
pub fn invalidate(&mut self, reason: ProviderTranscriptResetReason)
pub fn append_group( &mut self, anchor_message_id: impl Into<String>, id_hint: Option<&str>, items: Vec<ProviderTranscriptItem>, ) -> Result<String, ProviderTranscriptError>
Sourcepub fn prune_dangling_groups(
&mut self,
live_message_ids: &HashSet<String>,
) -> usize
pub fn prune_dangling_groups( &mut self, live_message_ids: &HashSet<String>, ) -> usize
Drop whole groups whose ordinary-message anchor no longer exists. No item within a group is ever retained independently.
pub fn replayable_groups( &self, family: ProviderFamily, protocol: ProviderProtocol, provider_boundary_sha256: &str, ) -> Vec<&ProviderTranscriptGroup>
Sourcepub fn merge_durable_prefix(
&mut self,
durable: &ProviderTranscriptState,
ordered_message_ids: &[String],
) -> usize
pub fn merge_durable_prefix( &mut self, durable: &ProviderTranscriptState, ordered_message_ids: &[String], ) -> usize
Append-safe merge used when a stale runner is reconciled with a durable prefix. Epoch boundaries outrank append revisions; within one family and epoch the higher revision wins. Missing compatible groups are retained, while a same-epoch foreign group falls back to its ordinary message.
pub fn diagnostics( &self, family: ProviderFamily, protocol: ProviderProtocol, provider_boundary_sha256: &str, ) -> ProviderTranscriptDiagnostics
Trait Implementations§
Source§impl Clone for ProviderTranscriptState
impl Clone for ProviderTranscriptState
Source§fn clone(&self) -> ProviderTranscriptState
fn clone(&self) -> ProviderTranscriptState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more