pub struct BlockIdentifier {
pub index: u64,
pub hash: String,
}
Expand description
BlockIdentifier : The block_identifier uniquely identifies a block in a particular network.
Fields§
§index: u64
This is also known as the block height.
hash: String
This should be normalized according to the case specified in the block_hash_case network options.
Implementations§
Source§impl BlockIdentifier
impl BlockIdentifier
Sourcepub fn new(index: u64, hash: String) -> BlockIdentifier
pub fn new(index: u64, hash: String) -> BlockIdentifier
The block_identifier uniquely identifies a block in a particular network.
Trait Implementations§
Source§impl Clone for BlockIdentifier
impl Clone for BlockIdentifier
Source§fn clone(&self) -> BlockIdentifier
fn clone(&self) -> BlockIdentifier
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlockIdentifier
impl Debug for BlockIdentifier
Source§impl Default for BlockIdentifier
impl Default for BlockIdentifier
Source§fn default() -> BlockIdentifier
fn default() -> BlockIdentifier
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockIdentifier
impl<'de> Deserialize<'de> for BlockIdentifier
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlockIdentifier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlockIdentifier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BlockIdentifier
impl PartialEq for BlockIdentifier
Source§impl Serialize for BlockIdentifier
impl Serialize for BlockIdentifier
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for BlockIdentifier
impl StructuralPartialEq for BlockIdentifier
Auto Trait Implementations§
impl Freeze for BlockIdentifier
impl RefUnwindSafe for BlockIdentifier
impl Send for BlockIdentifier
impl Sync for BlockIdentifier
impl Unpin for BlockIdentifier
impl UnwindSafe for BlockIdentifier
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