pub struct NonzeroParticipantAckCommit { /* private fields */ }Expand description
Atomic nonzero-debt participant-ack commit.
The commit retains both exact episode prestates plus the crate-private
membership cursor authority. Self::apply_to validates the aggregate as
one pair before changing either value, so consuming storage can persist the
resulting member and episode in one transaction and replay that transaction
from either wholly-old or wholly-resulting durable state.
Implementations§
Source§impl NonzeroParticipantAckCommit
impl NonzeroParticipantAckCommit
Sourcepub const fn outcome(&self) -> &AckCommitted
pub const fn outcome(&self) -> &AckCommitted
Borrows the exact committed wire outcome.
Sourcepub const fn observer_progress_projection(&self) -> ObserverProgressProjection
pub const fn observer_progress_projection(&self) -> ObserverProgressProjection
Projects the exact committed ack boundary into hard observer progress.
Sourcepub const fn resulting_episode(&self) -> &NonzeroDebtCursorEpisode
pub const fn resulting_episode(&self) -> &NonzeroDebtCursorEpisode
Borrows the exact episode that must be persisted with the member cursor.
Sourcepub fn apply_to<F>(
self,
member: &mut LiveMember<F>,
episode: &mut NonzeroDebtCursorEpisode,
) -> Result<AckCommitted, NonzeroParticipantAckCommitError>
pub fn apply_to<F>( self, member: &mut LiveMember<F>, episode: &mut NonzeroDebtCursorEpisode, ) -> Result<AckCommitted, NonzeroParticipantAckCommitError>
Applies this aggregate commit from an exact wholly-old or wholly-resulting durable prestate.
The old pair advances once. Replaying against the exact resulting pair
returns the identical AckCommitted without another change. A split
member/episode pair is rejected rather than silently repaired.
§Errors
Returns NonzeroParticipantAckCommitError for a mismatched member,
unrelated episode, or split aggregate prestate. Neither argument is
changed on error.
Trait Implementations§
Source§impl Clone for NonzeroParticipantAckCommit
impl Clone for NonzeroParticipantAckCommit
Source§fn clone(&self) -> NonzeroParticipantAckCommit
fn clone(&self) -> NonzeroParticipantAckCommit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more