Struct alloy_eips::eip1898::BlockWithParent
source · pub struct BlockWithParent {
pub parent: B256,
pub block: BlockNumHash,
}
Expand description
A helper struct to store the block number/hash and its parent hash.
Fields§
§parent: B256
Parent hash.
block: BlockNumHash
Block number/hash.
Implementations§
source§impl BlockWithParent
impl BlockWithParent
sourcepub const fn new(parent: B256, block: BlockNumHash) -> Self
pub const fn new(parent: B256, block: BlockNumHash) -> Self
Creates a new BlockWithParent
instance.
Trait Implementations§
source§impl Clone for BlockWithParent
impl Clone for BlockWithParent
source§fn clone(&self) -> BlockWithParent
fn clone(&self) -> BlockWithParent
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 BlockWithParent
impl Debug for BlockWithParent
source§impl<'de> Deserialize<'de> for BlockWithParent
impl<'de> Deserialize<'de> for BlockWithParent
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 BlockWithParent
impl Hash for BlockWithParent
source§impl PartialEq for BlockWithParent
impl PartialEq for BlockWithParent
source§fn eq(&self, other: &BlockWithParent) -> bool
fn eq(&self, other: &BlockWithParent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlockWithParent
impl Serialize for BlockWithParent
impl Copy for BlockWithParent
impl Eq for BlockWithParent
impl StructuralPartialEq for BlockWithParent
Auto Trait Implementations§
impl Freeze for BlockWithParent
impl RefUnwindSafe for BlockWithParent
impl Send for BlockWithParent
impl Sync for BlockWithParent
impl Unpin for BlockWithParent
impl UnwindSafe for BlockWithParent
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.