Skip to main content

MetadataIoCommitObservation

Enum MetadataIoCommitObservation 

Source
pub enum MetadataIoCommitObservation {
    Settled {
        generation: MetadataGeneration,
        outcome: MetadataIoCommitOutcome,
    },
    Unobserved {
        generation: MetadataGeneration,
    },
    TargetConflict(MetadataWriteRequest),
}
Expand description

What a caller actually confirmed about one admitted metadata snapshot.

Unlike MetadataIoCommitOutcome, this models the case where the caller stopped observing before the persistence protocol reached a terminal conclusion. An unobserved generation is not evidence that the write did not happen: the admitted snapshot keeps its ordering and byte charge, so it may still become durable, fail, or end unconfirmed after the caller’s deadline. Business owners must treat that generation as unconfirmed rather than as a definite failure.

Every conclusion except a target conflict carries the observed generation, so a caller can record the change identity and later resolve it against MetadataIoActor::confirmed_durable_generation.

Variants§

§

Settled

The persistence protocol reached a terminal conclusion within the caller’s deadline.

Fields

§generation: MetadataGeneration

The generation the caller observed.

§outcome: MetadataIoCommitOutcome

The conclusion the actor delivered.

§

Unobserved

The caller stopped observing first. The generation identifies the change whose durability was not confirmed.

Fields

§generation: MetadataGeneration

The generation whose durability was not confirmed.

§

TargetConflict(MetadataWriteRequest)

The request was not admitted because the resource is bound to a different process-local target.

Implementations§

Source§

impl MetadataIoCommitObservation

Source

pub fn requires_reconciliation(&self) -> bool

Returns whether the caller must treat durable state as unconfirmed.

True for an unobserved generation and for a replacement that the durability protocol did not confirm. False for a confirmed durable write, a failure before target replacement, and a target conflict.

Source

pub fn settled(self) -> Option<MetadataIoCommitOutcome>

Consumes the observation and returns the terminal conclusion, if any.

Source

pub const fn generation(&self) -> Option<MetadataGeneration>

Returns the observed generation, or None for a target conflict.

Source

pub const fn unobserved_generation(&self) -> Option<MetadataGeneration>

Returns the generation whose durability was not confirmed.

Trait Implementations§

Source§

impl Debug for MetadataIoCommitObservation

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