pub struct EventStreamHead {
pub mmr: Vec<U256>,
pub checkpoint_seq: u64,
pub num_events: u64,
}unstable only.Expand description
On-chain head of an authenticated event stream.
The framework maintains one of these per event stream as a dynamic field
on the accumulator root object (0xacc), keyed by
accumulator::Key<accumulator_settlement::EventStreamHead> { owner: stream_id }. Use derive_event_stream_head_object_id to compute the
dynamic field’s object id from the stream id.
Each settlement transaction that processes events for the stream folds a
per-checkpoint merkle tree root into the MMR using carry-propagation. The
framework guarantees at most one such settlement per stream per
checkpoint, so checkpoint_seq strictly identifies which checkpoint the
head reflects.
Mirrors sui::accumulator_settlement::EventStreamHead.
§BCS
event-stream-head = vector u256 u64 u64Fields§
§mmr: Vec<U256>Merkle Mountain Range peaks, ordered from the lowest level upward.
Empty slots hold U256::ZERO; the vector grows by one slot whenever
the carry propagates past the current highest level.
checkpoint_seq: u64The latest checkpoint whose events have been folded into the MMR.
num_events: u64Total number of events ever folded into the MMR.
Trait Implementations§
Source§impl Clone for EventStreamHead
impl Clone for EventStreamHead
Source§fn clone(&self) -> EventStreamHead
fn clone(&self) -> EventStreamHead
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventStreamHead
impl Debug for EventStreamHead
Source§impl Default for EventStreamHead
impl Default for EventStreamHead
Source§fn default() -> EventStreamHead
fn default() -> EventStreamHead
Source§impl<'de> Deserialize<'de> for EventStreamHead
impl<'de> Deserialize<'de> for EventStreamHead
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>,
Source§impl PartialEq for EventStreamHead
impl PartialEq for EventStreamHead
Source§impl Serialize for EventStreamHead
impl Serialize for EventStreamHead
impl Eq for EventStreamHead
impl StructuralPartialEq for EventStreamHead
Auto Trait Implementations§
impl Freeze for EventStreamHead
impl RefUnwindSafe for EventStreamHead
impl Send for EventStreamHead
impl Sync for EventStreamHead
impl Unpin for EventStreamHead
impl UnsafeUnpin for EventStreamHead
impl UnwindSafe for EventStreamHead
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>,
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
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>,
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,
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>
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>
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