Skip to main content

MetadataIoReceipt

Struct MetadataIoReceipt 

Source
pub struct MetadataIoReceipt { /* private fields */ }
Expand description

A receipt for an accepted immutable snapshot.

Implementations§

Source§

impl MetadataIoReceipt

Source

pub fn target_identity(&self) -> MetadataTargetIdentity

Returns the history identity to pair with this receipt’s generation.

A retired history cannot prove durability in a later target identity.

Source

pub const fn generation(&self) -> MetadataGeneration

Returns the accepted resource generation.

Source

pub async fn wait_for_persistence_status_until( self, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataWritePersistenceStatus>

Waits until the absolute deadline for the actor to report the terminal persistence status of this generation or a newer coalesced generation.

The status can confirm durability, report a failure before target replacement, or leave durability unconfirmed. An admitted write can still finish after the caller’s wait expires.

§Errors

An elapsed deadline returns a WaitForDurableMetadata timeout. A stopped worker or a coordinator channel that closes before delivering a status yields a MetadataWorkerStopped error.

Source

pub async fn observe_until( self, deadline: MetadataDeadline, ) -> MetadataIoCommitObservation

Observes this generation without collapsing an observation timeout into the persistence error channel.

Expiry returns MetadataIoCommitObservation::Unobserved rather than an error, because the accepted snapshot retains its ordering and byte charge and may still become durable. A caller that needs a definite answer must reconcile against the actor’s confirmed durable generation instead of treating the expiry as a failure.

This method never returns MetadataIoCommitObservation::TargetConflict: a receipt already identifies an admitted write. It retains only the result and history identity, not write authority.

Source

pub async fn wait_until( self, deadline: MetadataDeadline, ) -> RuntimeResult<MetadataGeneration>

Waits for this generation, or a newer coalesced generation, to become durable without extending the caller’s absolute deadline.

Expiry abandons this observation. Accepted writes retain their ordering and byte charge until actual completion, and may still become durable.

§Errors

Returns an operational runtime failure if persistence cannot complete.

Trait Implementations§

Source§

impl Debug for MetadataIoReceipt

Source§

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

Formats the value using the given formatter. Read more

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> 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, 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