pub struct CeremonyCommit { /* private fields */ }Expand description
The unit that is committed, all of it or none of it.
Implementations§
Source§impl CeremonyCommit
impl CeremonyCommit
Sourcepub fn new(
instance: CeremonyInstance,
expected_revision: ExpectedRevision,
facts: impl IntoIterator<Item = AuditFact>,
messages: impl IntoIterator<Item = OutboxMessage>,
) -> Result<Self, DomainError>
pub fn new( instance: CeremonyInstance, expected_revision: ExpectedRevision, facts: impl IntoIterator<Item = AuditFact>, messages: impl IntoIterator<Item = OutboxMessage>, ) -> Result<Self, DomainError>
Every fact must belong to the instance being committed.
Rejected here rather than in the adapter: a commit that mixes ceremonies has no correct interpretation, and every implementation would otherwise have to discover that independently.
pub fn instance(&self) -> &CeremonyInstance
pub fn expected_revision(&self) -> ExpectedRevision
pub fn facts(&self) -> &[AuditFact]
pub fn messages(&self) -> &[OutboxMessage]
Sourcepub fn into_parts(
self,
) -> (CeremonyInstance, ExpectedRevision, Vec<AuditFact>, Vec<OutboxMessage>)
pub fn into_parts( self, ) -> (CeremonyInstance, ExpectedRevision, Vec<AuditFact>, Vec<OutboxMessage>)
Consume the commit into the parts an adapter writes.
Trait Implementations§
Source§impl Clone for CeremonyCommit
impl Clone for CeremonyCommit
Source§fn clone(&self) -> CeremonyCommit
fn clone(&self) -> CeremonyCommit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CeremonyCommit
impl Debug for CeremonyCommit
Source§impl PartialEq for CeremonyCommit
impl PartialEq for CeremonyCommit
impl StructuralPartialEq for CeremonyCommit
Auto Trait Implementations§
impl Freeze for CeremonyCommit
impl RefUnwindSafe for CeremonyCommit
impl Send for CeremonyCommit
impl Sync for CeremonyCommit
impl Unpin for CeremonyCommit
impl UnsafeUnpin for CeremonyCommit
impl UnwindSafe for CeremonyCommit
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