pub struct MetadataIoReceipt { /* private fields */ }Expand description
A receipt for an accepted immutable snapshot.
Implementations§
Source§impl MetadataIoReceipt
impl MetadataIoReceipt
Sourcepub fn target_identity(&self) -> MetadataTargetIdentity
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.
Sourcepub const fn generation(&self) -> MetadataGeneration
pub const fn generation(&self) -> MetadataGeneration
Returns the accepted resource generation.
Sourcepub async fn wait_for_persistence_status_until(
self,
deadline: MetadataDeadline,
) -> RuntimeResult<MetadataWritePersistenceStatus>
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.
Sourcepub async fn observe_until(
self,
deadline: MetadataDeadline,
) -> MetadataIoCommitObservation
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.
Sourcepub async fn wait_until(
self,
deadline: MetadataDeadline,
) -> RuntimeResult<MetadataGeneration>
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.