Struct ckb_types::core::UncleBlockView
source · pub struct UncleBlockView { /* private fields */ }
Expand description
A readonly and immutable struct which includes UncleBlock
and its hash.
Notice
This struct is not implement the trait Default
, use BlockView::as_uncle()
to construct it.
Implementations§
source§impl UncleBlockView
impl UncleBlockView
sourcepub fn data(&self) -> UncleBlock
pub fn data(&self) -> UncleBlock
Gets a clone of packed::UncleBlock
.
sourcepub fn number(&self) -> BlockNumber
pub fn number(&self) -> BlockNumber
Gets header.raw.number
.
sourcepub fn compact_target(&self) -> u32
pub fn compact_target(&self) -> u32
Gets header.raw.compact_target
.
sourcepub fn epoch(&self) -> EpochNumberWithFraction
pub fn epoch(&self) -> EpochNumberWithFraction
Gets header.raw.epoch
.
sourcepub fn parent_hash(&self) -> Byte32
pub fn parent_hash(&self) -> Byte32
Gets header.raw.parent_hash
.
sourcepub fn transactions_root(&self) -> Byte32
pub fn transactions_root(&self) -> Byte32
Gets header.raw.transactions_root
.
sourcepub fn proposals_hash(&self) -> Byte32
pub fn proposals_hash(&self) -> Byte32
Gets header.raw.proposals_hash
.
sourcepub fn extra_hash(&self) -> Byte32
pub fn extra_hash(&self) -> Byte32
Gets header.raw.extra_hash
.
sourcepub fn difficulty(&self) -> U256
pub fn difficulty(&self) -> U256
Gets header.raw.difficulty
.
sourcepub fn header(&self) -> HeaderView
pub fn header(&self) -> HeaderView
Gets header
.
sourcepub fn calc_proposals_hash(&self) -> Byte32
pub fn calc_proposals_hash(&self) -> Byte32
Calculates the hash for proposals.
sourcepub fn serialized_size_in_block() -> usize
pub fn serialized_size_in_block() -> usize
Calculates the serialized size of a UncleBlock in Block.
Trait Implementations§
source§impl Clone for UncleBlockView
impl Clone for UncleBlockView
source§fn clone(&self) -> UncleBlockView
fn clone(&self) -> UncleBlockView
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 UncleBlockView
impl Debug for UncleBlockView
source§impl Display for UncleBlockView
impl Display for UncleBlockView
source§impl Hash for UncleBlockView
impl Hash for UncleBlockView
source§impl PartialEq<UncleBlockView> for UncleBlockView
impl PartialEq<UncleBlockView> for UncleBlockView
impl Eq for UncleBlockView
Auto Trait Implementations§
impl RefUnwindSafe for UncleBlockView
impl Send for UncleBlockView
impl Sync for UncleBlockView
impl Unpin for UncleBlockView
impl UnwindSafe for UncleBlockView
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