pub struct OperationIntent { /* private fields */ }Expand description
Canonical semantic intent whose identity survives grants, attempts, and leases.
Implementations§
Source§impl OperationIntent
impl OperationIntent
Sourcepub fn new(
operation: impl Into<String>,
target: Datum,
intended_result: Datum,
replay_policy: ReplayPolicy,
) -> Result<Self, OperationError>
pub fn new( operation: impl Into<String>, target: Datum, intended_result: Datum, replay_policy: ReplayPolicy, ) -> Result<Self, OperationError>
Constructs and identifies one immutable intent.
Sourcepub const fn id(&self) -> &OperationId
pub const fn id(&self) -> &OperationId
Returns the stable operation identity.
Sourcepub const fn intended_result(&self) -> &Datum
pub const fn intended_result(&self) -> &Datum
Returns the intended semantic postcondition.
Sourcepub const fn replay_policy(&self) -> ReplayPolicy
pub const fn replay_policy(&self) -> ReplayPolicy
Returns the replay rule bound into this intent.
Sourcepub fn canonical_datum(&self) -> Datum
pub fn canonical_datum(&self) -> Datum
Returns the exact canonical value whose id is Self::id.
Trait Implementations§
Source§impl Clone for OperationIntent
impl Clone for OperationIntent
Source§fn clone(&self) -> OperationIntent
fn clone(&self) -> OperationIntent
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 OperationIntent
impl Debug for OperationIntent
impl Eq for OperationIntent
Source§impl PartialEq for OperationIntent
impl PartialEq for OperationIntent
impl StructuralPartialEq for OperationIntent
Auto Trait Implementations§
impl Freeze for OperationIntent
impl RefUnwindSafe for OperationIntent
impl Send for OperationIntent
impl Sync for OperationIntent
impl Unpin for OperationIntent
impl UnsafeUnpin for OperationIntent
impl UnwindSafe for OperationIntent
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