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
sourceimpl Clone for BlockHeaderData
impl Clone for BlockHeaderData
sourcefn clone(&self) -> BlockHeaderData
fn clone(&self) -> BlockHeaderData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BlockHeaderData
impl Debug for BlockHeaderData
sourceimpl PartialEq<BlockHeaderData> for BlockHeaderData
impl PartialEq<BlockHeaderData> for BlockHeaderData
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &BlockHeaderData) -> bool
fn ne(&self, other: &BlockHeaderData) -> bool
This method tests for !=
.
sourceimpl TryInto<BlockHeaderData> for JsonResponse
impl TryInto<BlockHeaderData> for JsonResponse
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.
sourceimpl 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 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more