pub struct BlockNumberAndHash {
pub number: BlockNumber,
pub hash: Byte32,
}
Expand description
Block Number And Hash struct
Fields§
§number: BlockNumber
Block Number
hash: Byte32
Block Hash
Implementations§
Source§impl BlockNumberAndHash
impl BlockNumberAndHash
Sourcepub fn new(number: BlockNumber, hash: Byte32) -> Self
pub fn new(number: BlockNumber, hash: Byte32) -> Self
Create new BlockNumberAndHash
Sourcepub fn number(&self) -> BlockNumber
pub fn number(&self) -> BlockNumber
Return BlockNumber
Trait Implementations§
Source§impl Clone for BlockNumberAndHash
impl Clone for BlockNumberAndHash
Source§fn clone(&self) -> BlockNumberAndHash
fn clone(&self) -> BlockNumberAndHash
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 BlockNumberAndHash
impl Debug for BlockNumberAndHash
Source§impl From<&HeaderView> for BlockNumberAndHash
impl From<&HeaderView> for BlockNumberAndHash
Source§fn from(header: &HeaderView) -> Self
fn from(header: &HeaderView) -> Self
Converts to this type from the input type.
Source§impl From<(u64, Byte32)> for BlockNumberAndHash
impl From<(u64, Byte32)> for BlockNumberAndHash
Source§fn from(inner: (BlockNumber, Byte32)) -> Self
fn from(inner: (BlockNumber, Byte32)) -> Self
Converts to this type from the input type.
Source§impl From<HeaderView> for BlockNumberAndHash
impl From<HeaderView> for BlockNumberAndHash
Source§fn from(header: HeaderView) -> Self
fn from(header: HeaderView) -> Self
Converts to this type from the input type.
Source§impl Hash for BlockNumberAndHash
impl Hash for BlockNumberAndHash
Source§impl Ord for BlockNumberAndHash
impl Ord for BlockNumberAndHash
Source§fn cmp(&self, other: &BlockNumberAndHash) -> Ordering
fn cmp(&self, other: &BlockNumberAndHash) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BlockNumberAndHash
impl PartialEq for BlockNumberAndHash
Source§impl PartialOrd for BlockNumberAndHash
impl PartialOrd for BlockNumberAndHash
impl Eq for BlockNumberAndHash
impl StructuralPartialEq for BlockNumberAndHash
Auto Trait Implementations§
impl !Freeze for BlockNumberAndHash
impl RefUnwindSafe for BlockNumberAndHash
impl Send for BlockNumberAndHash
impl Sync for BlockNumberAndHash
impl Unpin for BlockNumberAndHash
impl UnwindSafe for BlockNumberAndHash
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
)