pub struct SuperRoot {
pub timestamp: u64,
pub output_roots: Vec<OutputRootWithChain>,
}Expand description
The SuperRoot is the snapshot of the superchain at a given timestamp.
Fields§
§timestamp: u64The timestamp of the superchain snapshot, in seconds.
output_roots: Vec<OutputRootWithChain>The chain IDs and output root commitments of all chains within the dependency set.
Implementations§
Source§impl SuperRoot
impl SuperRoot
Sourcepub fn new(timestamp: u64, output_roots: Vec<OutputRootWithChain>) -> SuperRoot
pub fn new(timestamp: u64, output_roots: Vec<OutputRootWithChain>) -> SuperRoot
Create a new SuperRoot with the given timestamp and output roots.
Sourcepub fn decode(buf: &mut &[u8]) -> Result<SuperRoot, SuperRootError>
pub fn decode(buf: &mut &[u8]) -> Result<SuperRoot, SuperRootError>
Decodes a SuperRoot from the given buffer.
Sourcepub fn encoded_length(&self) -> usize
pub fn encoded_length(&self) -> usize
Returns the encoded length of the SuperRoot.
Sourcepub fn hash(&self) -> FixedBytes<32>
pub fn hash(&self) -> FixedBytes<32>
Trait Implementations§
impl Eq for SuperRoot
impl StructuralPartialEq for SuperRoot
Auto Trait Implementations§
impl Freeze for SuperRoot
impl RefUnwindSafe for SuperRoot
impl Send for SuperRoot
impl Sync for SuperRoot
impl Unpin for SuperRoot
impl UnwindSafe for SuperRoot
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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