Struct lightning_block_sync::BlockHeaderData
source · pub struct BlockHeaderData {
pub header: BlockHeader,
pub height: u32,
pub chainwork: Uint256,
}
Expand description
A block header and some associated data. This information should be available from most block sources (and, notably, is available in Bitcoin Core’s RPC and REST interfaces).
Fields§
§header: BlockHeader
The block header itself.
height: u32
The block height where the genesis block has height 0.
chainwork: Uint256
The total chain work in expected number of double-SHA256 hashes required to build a chain of equivalent weight.
Trait Implementations§
source§impl Clone for BlockHeaderData
impl Clone for BlockHeaderData
source§fn clone(&self) -> BlockHeaderData
fn clone(&self) -> BlockHeaderData
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 BlockHeaderData
impl Debug for BlockHeaderData
source§impl PartialEq<BlockHeaderData> for BlockHeaderData
impl PartialEq<BlockHeaderData> for BlockHeaderData
source§fn eq(&self, other: &BlockHeaderData) -> bool
fn eq(&self, other: &BlockHeaderData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<Value> for BlockHeaderData
Available on crate features rest-client
or rpc-client
only.
impl TryFrom<Value> for BlockHeaderData
Available on crate features
rest-client
or rpc-client
only.source§impl TryInto<BlockHeaderData> for JsonResponse
Available on crate features rest-client
or rpc-client
only.
impl TryInto<BlockHeaderData> for JsonResponse
Available on crate features
rest-client
or rpc-client
only.Converts a JSON value into block header data. The JSON value may be an object representing a block header or an array of such objects. In the latter case, the first object is converted.
source§impl Validate for BlockHeaderData
impl Validate for BlockHeaderData
§type T = ValidatedBlockHeader
type T = ValidatedBlockHeader
The validated data wrapper which can be dereferenced to obtain the validated data.
impl Copy for BlockHeaderData
impl Eq for BlockHeaderData
impl StructuralEq for BlockHeaderData
impl StructuralPartialEq for BlockHeaderData
Auto Trait Implementations§
impl RefUnwindSafe for BlockHeaderData
impl Send for BlockHeaderData
impl Sync for BlockHeaderData
impl Unpin for BlockHeaderData
impl UnwindSafe for BlockHeaderData
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