Skip to main content

ProviderTranscriptState

Struct ProviderTranscriptState 

Source
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

Source

pub fn is_empty(&self) -> bool

Source

pub fn state_revision(&self) -> u64

Source

pub fn epoch(&self) -> u64

Source

pub fn active_family(&self) -> Option<ProviderFamily>

Source

pub fn active_protocol(&self) -> Option<ProviderProtocol>

Source

pub fn active_provider_boundary_sha256(&self) -> Option<&str>

Source

pub fn last_reset_reason(&self) -> Option<ProviderTranscriptResetReason>

Source

pub fn groups(&self) -> &[ProviderTranscriptGroup]

Source

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.

Source

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.

Source

pub fn invalidate(&mut self, reason: ProviderTranscriptResetReason)

Source

pub fn append_group( &mut self, anchor_message_id: impl Into<String>, id_hint: Option<&str>, items: Vec<ProviderTranscriptItem>, ) -> Result<String, ProviderTranscriptError>

Source

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.

Source

pub fn replayable_groups( &self, family: ProviderFamily, protocol: ProviderProtocol, provider_boundary_sha256: &str, ) -> Vec<&ProviderTranscriptGroup>

Source

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.

Source

pub fn diagnostics( &self, family: ProviderFamily, protocol: ProviderProtocol, provider_boundary_sha256: &str, ) -> ProviderTranscriptDiagnostics

Trait Implementations§

Source§

impl Clone for ProviderTranscriptState

Source§

fn clone(&self) -> ProviderTranscriptState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProviderTranscriptState

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProviderTranscriptState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ProviderTranscriptState

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ProviderTranscriptState

Source§

fn eq(&self, other: &ProviderTranscriptState) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ProviderTranscriptState

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ProviderTranscriptState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more