pub struct CommitBody { /* private fields */ }Expand description
A decrypted atomic domain transaction.
Implementations§
Source§impl CommitBody
impl CommitBody
Sourcepub fn new(
transaction_id: TransactionId,
operations: Vec<Operation>,
) -> Result<CommitBody, CommitCodecError>
pub fn new( transaction_id: TransactionId, operations: Vec<Operation>, ) -> Result<CommitBody, CommitCodecError>
Constructs a bounded transaction body.
Sourcepub const fn transaction_id(&self) -> TransactionId
pub const fn transaction_id(&self) -> TransactionId
Returns the idempotency identity of the local transaction.
Sourcepub fn operations(&self) -> &[Operation]
pub fn operations(&self) -> &[Operation]
Returns operations in transaction order.
Sourcepub fn encode_canonical(&self) -> Vec<u8> ⓘ
pub fn encode_canonical(&self) -> Vec<u8> ⓘ
Encodes the transaction body before encryption.
Sourcepub fn decode_canonical(bytes: &[u8]) -> Result<CommitBody, CommitCodecError>
pub fn decode_canonical(bytes: &[u8]) -> Result<CommitBody, CommitCodecError>
Strictly decodes a decrypted transaction body.
Trait Implementations§
Source§impl Clone for CommitBody
impl Clone for CommitBody
Source§fn clone(&self) -> CommitBody
fn clone(&self) -> CommitBody
Returns a duplicate of the value. Read more
1.0.0 · 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 CommitBody
impl Debug for CommitBody
Source§impl PartialEq for CommitBody
impl PartialEq for CommitBody
impl Eq for CommitBody
impl StructuralPartialEq for CommitBody
Auto Trait Implementations§
impl Freeze for CommitBody
impl RefUnwindSafe for CommitBody
impl Send for CommitBody
impl Sync for CommitBody
impl Unpin for CommitBody
impl UnwindSafe for CommitBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more