pub struct L2BlockInfo {
pub block_info: BlockInfo,
pub l1_origin: BlockNumHash,
pub seq_num: u64,
}
Expand description
L2 Block Header Info
Fields§
§block_info: BlockInfo
The base BlockInfo
l1_origin: BlockNumHash
The L1 origin BlockNumHash
seq_num: u64
The sequence number of the L2 block
Implementations§
Source§impl L2BlockInfo
impl L2BlockInfo
Sourcepub const fn new(
block_info: BlockInfo,
l1_origin: BlockNumHash,
seq_num: u64,
) -> Self
pub const fn new( block_info: BlockInfo, l1_origin: BlockNumHash, seq_num: u64, ) -> Self
Instantiates a new L2BlockInfo.
Sourcepub fn from_block_and_genesis(
block: &OpBlock,
genesis: &ChainGenesis,
) -> Result<Self, FromBlockError>
pub fn from_block_and_genesis( block: &OpBlock, genesis: &ChainGenesis, ) -> Result<Self, FromBlockError>
Constructs an L2BlockInfo from a given OpBlock and ChainGenesis.
Trait Implementations§
Source§impl Clone for L2BlockInfo
impl Clone for L2BlockInfo
Source§fn clone(&self) -> L2BlockInfo
fn clone(&self) -> L2BlockInfo
Returns a copy 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 L2BlockInfo
impl Debug for L2BlockInfo
Source§impl Default for L2BlockInfo
impl Default for L2BlockInfo
Source§fn default() -> L2BlockInfo
fn default() -> L2BlockInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for L2BlockInfo
impl<'de> Deserialize<'de> for L2BlockInfo
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 L2BlockInfo
impl Hash for L2BlockInfo
Source§impl PartialEq for L2BlockInfo
impl PartialEq for L2BlockInfo
Source§impl Serialize for L2BlockInfo
impl Serialize for L2BlockInfo
impl Copy for L2BlockInfo
impl Eq for L2BlockInfo
impl StructuralPartialEq for L2BlockInfo
Auto Trait Implementations§
impl Freeze for L2BlockInfo
impl RefUnwindSafe for L2BlockInfo
impl Send for L2BlockInfo
impl Sync for L2BlockInfo
impl Unpin for L2BlockInfo
impl UnwindSafe for L2BlockInfo
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)