pub struct CompactBlock(/* private fields */);
Implementations§
Source§impl CompactBlock
impl CompactBlock
Sourcepub fn calc_header_hash(&self) -> Byte32
pub fn calc_header_hash(&self) -> Byte32
Source§impl CompactBlock
impl CompactBlock
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 CompactBlock
impl CompactBlock
pub const FIELD_COUNT: usize = 5usize
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 short_ids(&self) -> ProposalShortIdVec
pub fn prefilled_transactions(&self) -> IndexTransactionVec
pub fn uncles(&self) -> Byte32Vec
pub fn proposals(&self) -> ProposalShortIdVec
pub fn as_reader<'r>(&'r self) -> CompactBlockReader<'r>
Trait Implementations§
Source§impl Clone for CompactBlock
impl Clone for CompactBlock
Source§fn clone(&self) -> CompactBlock
fn clone(&self) -> CompactBlock
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 CompactBlock
impl Debug for CompactBlock
Source§impl Default for CompactBlock
impl Default for CompactBlock
Source§impl Display for CompactBlock
impl Display for CompactBlock
Source§impl Entity for CompactBlock
impl Entity for CompactBlock
const NAME: &'static str = "CompactBlock"
type Builder = CompactBlockBuilder
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
Source§impl From<CompactBlock> for RelayMessageUnion
impl From<CompactBlock> for RelayMessageUnion
Source§fn from(item: CompactBlock) -> Self
fn from(item: CompactBlock) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for CompactBlock
impl RefUnwindSafe for CompactBlock
impl Send for CompactBlock
impl Sync for CompactBlock
impl Unpin for CompactBlock
impl UnwindSafe for CompactBlock
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
)