pub struct JournalTransaction {
pub tx_id: u32,
pub tick: u64,
pub command_hash: u64,
pub actor_did: u64,
pub adds: Vec<NQuin>,
pub removes: Vec<NQuin>,
pub lexicon_bindings: Vec<(u64, String)>,
pub receipt_digest: [u8; 32],
pub committed: bool,
}Expand description
An atomic transaction delta over canonical 48-byte Quins.
Fields§
§tx_id: u32§tick: u64§command_hash: u64§actor_did: u64§adds: Vec<NQuin>§removes: Vec<NQuin>§lexicon_bindings: Vec<(u64, String)>§receipt_digest: [u8; 32]§committed: boolImplementations§
Source§impl JournalTransaction
impl JournalTransaction
Sourcepub fn new(tx_id: u32, tick: u64, command_hash: u64, actor_did: u64) -> Self
pub fn new(tx_id: u32, tick: u64, command_hash: u64, actor_did: u64) -> Self
Creates an empty transaction delta: tx_id, logical tick, the hash
of the originating command, and the acting agent’s DID hash.
Sourcepub fn add_quin(&mut self, quin: NQuin)
pub fn add_quin(&mut self, quin: NQuin)
Stages a quin addition into the transaction’s added list.
Sourcepub fn remove_quin(&mut self, quin: NQuin)
pub fn remove_quin(&mut self, quin: NQuin)
Stages a quin removal into the transaction’s removed list.
Sourcepub fn bind_lexicon(&mut self, token_hash: u64, iri: String)
pub fn bind_lexicon(&mut self, token_hash: u64, iri: String)
Stages a hash→IRI lexicon binding so replay can resolve token hashes.
Trait Implementations§
Source§impl Clone for JournalTransaction
impl Clone for JournalTransaction
Source§impl Debug for JournalTransaction
impl Debug for JournalTransaction
impl Eq for JournalTransaction
Source§impl PartialEq for JournalTransaction
impl PartialEq for JournalTransaction
impl StructuralPartialEq for JournalTransaction
Auto Trait Implementations§
impl Freeze for JournalTransaction
impl RefUnwindSafe for JournalTransaction
impl Send for JournalTransaction
impl Sync for JournalTransaction
impl Unpin for JournalTransaction
impl UnsafeUnpin for JournalTransaction
impl UnwindSafe for JournalTransaction
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Checks if this value is equivalent to the given key. Read more
§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<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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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