Struct alloy_eips::eip1898::BlockNumHash
source · pub struct BlockNumHash {
pub number: BlockNumber,
pub hash: BlockHash,
}Expand description
Block number and hash.
Fields§
§number: BlockNumberBlock number
hash: BlockHashBlock hash
Implementations§
source§impl BlockNumHash
impl BlockNumHash
sourcepub const fn new(number: BlockNumber, hash: BlockHash) -> Self
pub const fn new(number: BlockNumber, hash: BlockHash) -> Self
Creates a new BlockNumHash from a block number and hash.
sourcepub const fn into_components(self) -> (BlockNumber, BlockHash)
pub const fn into_components(self) -> (BlockNumber, BlockHash)
Consumes Self and returns BlockNumber, BlockHash
sourcepub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool
pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool
Returns whether or not the block matches the given BlockHashOrNumber.
Trait Implementations§
source§impl Clone for BlockNumHash
impl Clone for BlockNumHash
source§fn clone(&self) -> BlockNumHash
fn clone(&self) -> BlockNumHash
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 BlockNumHash
impl Debug for BlockNumHash
source§impl Default for BlockNumHash
impl Default for BlockNumHash
source§fn default() -> BlockNumHash
fn default() -> BlockNumHash
Returns the “default value” for a type. Read more
source§impl From<(FixedBytes<32>, u64)> for BlockNumHash
impl From<(FixedBytes<32>, u64)> for BlockNumHash
source§fn from(val: (BlockHash, BlockNumber)) -> Self
fn from(val: (BlockHash, BlockNumber)) -> Self
Converts to this type from the input type.
source§impl From<(u64, FixedBytes<32>)> for BlockNumHash
impl From<(u64, FixedBytes<32>)> for BlockNumHash
source§fn from(val: (BlockNumber, BlockHash)) -> Self
fn from(val: (BlockNumber, BlockHash)) -> Self
Converts to this type from the input type.
source§impl Hash for BlockNumHash
impl Hash for BlockNumHash
source§impl PartialEq for BlockNumHash
impl PartialEq for BlockNumHash
source§fn eq(&self, other: &BlockNumHash) -> bool
fn eq(&self, other: &BlockNumHash) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for BlockNumHash
impl Eq for BlockNumHash
impl StructuralPartialEq for BlockNumHash
Auto Trait Implementations§
impl Freeze for BlockNumHash
impl RefUnwindSafe for BlockNumHash
impl Send for BlockNumHash
impl Sync for BlockNumHash
impl Unpin for BlockNumHash
impl UnwindSafe for BlockNumHash
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§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<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> 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