pub struct ConversationCommit { /* private fields */ }Expand description
Ownership barrier between event selection and durable append.
The aggregate is private while the event is speculative. It becomes usable
only through consuming ConversationCommit::commit, or returns unchanged
through consuming ConversationCommit::abort if append fails.
ⓘ
use liminal_protocol::lifecycle::ConversationCommit;
fn leak(commit: ConversationCommit) {
let _ = commit.conversation;
}Implementations§
Source§impl ConversationCommit
impl ConversationCommit
Sourcepub const fn event(&self) -> &ConversationEvent
pub const fn event(&self) -> &ConversationEvent
Borrows the exact event that must be durably appended.
Sourcepub const fn commit(self) -> ParticipantConversation
pub const fn commit(self) -> ParticipantConversation
Consumes the durability barrier and advances to the committed state.
Sourcepub const fn abort(self) -> ParticipantConversation
pub const fn abort(self) -> ParticipantConversation
Cancels a failed append and recovers the byte-for-byte unchanged pre-state.
Trait Implementations§
Source§impl Debug for ConversationCommit
impl Debug for ConversationCommit
impl Eq for ConversationCommit
Source§impl PartialEq for ConversationCommit
impl PartialEq for ConversationCommit
impl StructuralPartialEq for ConversationCommit
Auto Trait Implementations§
impl Freeze for ConversationCommit
impl RefUnwindSafe for ConversationCommit
impl Send for ConversationCommit
impl Sync for ConversationCommit
impl Unpin for ConversationCommit
impl UnsafeUnpin for ConversationCommit
impl UnwindSafe for ConversationCommit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more