pub struct Block(/* private fields */);
Implementations§
Source§impl Block
impl Block
Sourcepub fn calc_header_hash(&self) -> Byte32
pub fn calc_header_hash(&self) -> Byte32
Calls BlockReader.calc_header_hash()
for self.as_reader()
.
Source§impl Block
impl Block
Sourcepub fn calc_uncles_hash(&self) -> Byte32
pub fn calc_uncles_hash(&self) -> Byte32
Calls BlockReader.calc_uncles_hash()
for self.as_reader()
.
Source§impl Block
impl Block
Sourcepub fn calc_tx_hashes(&self) -> Vec<Byte32>
pub fn calc_tx_hashes(&self) -> Vec<Byte32>
Calls BlockReader.calc_tx_hashes()
for self.as_reader()
.
Source§impl Block
impl Block
Sourcepub fn as_uncle(&self) -> UncleBlock
pub fn as_uncle(&self) -> UncleBlock
Converts self to an uncle block.
Sourcepub fn extra_field(&self, index: usize) -> Option<Bytes>
pub fn extra_field(&self, index: usize) -> Option<Bytes>
Gets the i-th extra field if it exists; i started from 0.
Source§impl Block
impl Block
pub const FIELD_COUNT: usize = 4usize
pub fn total_size(&self) -> usize
pub fn field_count(&self) -> usize
pub fn count_extra_fields(&self) -> usize
pub fn has_extra_fields(&self) -> bool
pub fn header(&self) -> Header
pub fn uncles(&self) -> UncleBlockVec
pub fn transactions(&self) -> TransactionVec
pub fn proposals(&self) -> ProposalShortIdVec
pub fn as_reader<'r>(&'r self) -> BlockReader<'r>
Trait Implementations§
Source§impl Entity for Block
impl Entity for Block
const NAME: &'static str = "Block"
type Builder = BlockBuilder
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8] ⓘ
fn from_slice(slice: &[u8]) -> VerificationResult<Self>
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>
fn new_builder() -> Self::Builder
fn as_builder(self) -> Self::Builder
impl Eq for Block
Auto Trait Implementations§
impl !Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)