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>
impl<T> AggregateOperationCommit<T>
Sourcepub const fn event(&self) -> &ConversationEvent
pub const fn event(&self) -> &ConversationEvent
Borrows the exact event that must be durably appended before commit.
Sourcepub fn commit(self) -> (ParticipantConversation, T)
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.
Sourcepub fn abort(self) -> (ParticipantConversation, T)
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.