pub struct EventCommitment {
pub checkpoint_seq: u64,
pub transaction_idx: u64,
pub event_idx: u64,
pub digest: Digest,
}Available on crate feature
unstable only.Expand description
A commitment to a single event for inclusion in an authenticated event stream’s Merkle Mountain Range.
Each leaf of the per-checkpoint merkle tree is the BCS encoding of this struct. The four fields together identify the event’s position in the ledger and bind it to its content:
checkpoint_seq: the checkpoint containing the emitting transaction.transaction_idx: the emitting transaction’s 0-based index within its checkpoint (user transactions are numbered first, settlement transactions continue the same sequence).event_idx: the event’s 0-based index within its transaction’s event list.digest: the per-event digest,BLAKE2b-256(BCS ofEvent)`.
Ordering is lexicographic over (checkpoint_seq, transaction_idx, event_idx) only; the per-event digest is not part of the comparison since
the positional tuple already uniquely identifies an event.
Mirrors sui::accumulator_settlement::EventCommitment on the Move side.
§BCS
event-commitment = u64 u64 u64 digestFields§
§checkpoint_seq: u64§transaction_idx: u64§event_idx: u64§digest: DigestTrait Implementations§
Source§impl Clone for EventCommitment
impl Clone for EventCommitment
Source§fn clone(&self) -> EventCommitment
fn clone(&self) -> EventCommitment
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 EventCommitment
impl Debug for EventCommitment
Source§impl<'de> Deserialize<'de> for EventCommitment
impl<'de> Deserialize<'de> for EventCommitment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for EventCommitment
impl Hash for EventCommitment
Source§impl Ord for EventCommitment
impl Ord for EventCommitment
Source§impl PartialEq for EventCommitment
impl PartialEq for EventCommitment
Source§impl PartialOrd for EventCommitment
impl PartialOrd for EventCommitment
Source§impl Serialize for EventCommitment
impl Serialize for EventCommitment
impl Copy for EventCommitment
impl Eq for EventCommitment
impl StructuralPartialEq for EventCommitment
Auto Trait Implementations§
impl Freeze for EventCommitment
impl RefUnwindSafe for EventCommitment
impl Send for EventCommitment
impl Sync for EventCommitment
impl Unpin for EventCommitment
impl UnsafeUnpin for EventCommitment
impl UnwindSafe for EventCommitment
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
Source§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
Source§fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
Available on crate feature
serde only.Source§fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
Available on crate feature
serde only.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