Enum cfx_rpc_eth_types::BlockNumber
source · pub enum BlockNumber {
Hash {
hash: H256,
require_canonical: bool,
},
Num(u64),
Latest,
Earliest,
Pending,
Safe,
Finalized,
}
Expand description
Represents rpc api block number param.
Variants§
Hash
Hash
Num(u64)
Number
Latest
Latest block
Earliest
Earliest block (genesis)
Pending
Pending block (being mined)
Safe
Compatibility tag support for ethereum “safe” tag. Will reflect to “latest_confirmed”
Finalized
Finalized block
Implementations§
source§impl BlockNumber
impl BlockNumber
sourcepub fn to_min_block_num(&self) -> Option<u64>
pub fn to_min_block_num(&self) -> Option<u64>
Convert block number to min block target.
Trait Implementations§
source§impl Clone for BlockNumber
impl Clone for BlockNumber
source§fn clone(&self) -> BlockNumber
fn clone(&self) -> BlockNumber
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 BlockNumber
impl Debug for BlockNumber
source§impl Default for BlockNumber
impl Default for BlockNumber
source§impl<'a> Deserialize<'a> for BlockNumber
impl<'a> Deserialize<'a> for BlockNumber
source§fn deserialize<D>(deserializer: D) -> Result<BlockNumber, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<BlockNumber, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for BlockNumber
impl Hash for BlockNumber
source§impl PartialEq for BlockNumber
impl PartialEq for BlockNumber
source§fn eq(&self, other: &BlockNumber) -> bool
fn eq(&self, other: &BlockNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlockNumber
impl Serialize for BlockNumber
source§impl TryFrom<BlockNumber> for EpochNumber
impl TryFrom<BlockNumber> for EpochNumber
impl Eq for BlockNumber
impl StructuralPartialEq for BlockNumber
Auto Trait Implementations§
impl RefUnwindSafe for BlockNumber
impl Send for BlockNumber
impl Sync for BlockNumber
impl Unpin for BlockNumber
impl UnwindSafe for BlockNumber
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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.