Skip to main content

AggregateOperationCommit

Struct AggregateOperationCommit 

Source
pub struct AggregateOperationCommit<T> { /* private fields */ }
Expand description

Aggregate durability barrier pairing one selected shell event with the consumed typed operation commit.

Both fields are private: while the event is speculative, neither the shell nor the consumed operation authority is reachable, so nothing can be persisted or executed from a not-yet-durable decision.

use liminal_protocol::lifecycle::AggregateOperationCommit;

fn leak<T>(commit: AggregateOperationCommit<T>) {
    let _ = commit.operation;
}

Implementations§

Source§

impl<T> AggregateOperationCommit<T>

Source

pub const fn event(&self) -> &ConversationEvent

Borrows the exact event that must be durably appended before commit.

Source

pub fn commit(self) -> (ParticipantConversation, T)

Consumes the barrier after a confirmed durable append.

Returns the advanced shell together with the intact typed operation commit, so the caller persists the operation’s own resulting state in the same durable transaction as the appended event.

Source

pub fn abort(self) -> (ParticipantConversation, T)

Cancels a failed durable append.

Returns the byte-for-byte unchanged shell pre-state together with the intact typed operation commit; nothing advanced and no authority was dropped.

Trait Implementations§

Source§

impl<T: Debug> Debug for AggregateOperationCommit<T>

Source§

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

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

impl<T: Eq> Eq for AggregateOperationCommit<T>

Source§

impl<T: PartialEq> PartialEq for AggregateOperationCommit<T>

Source§

fn eq(&self, other: &AggregateOperationCommit<T>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<T: PartialEq> StructuralPartialEq for AggregateOperationCommit<T>

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

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.