[−][src]Struct ckb_types::packed::Block
Implementations
impl Block[src]
pub const FIELD_COUNT: usize[src]
pub fn total_size(&self) -> usize[src]
pub fn field_count(&self) -> usize[src]
pub fn count_extra_fields(&self) -> usize[src]
pub fn has_extra_fields(&self) -> bool[src]
pub fn header(&self) -> Header[src]
pub fn uncles(&self) -> UncleBlockVec[src]
pub fn transactions(&self) -> TransactionVec[src]
pub fn proposals(&self) -> ProposalShortIdVec[src]
pub fn as_reader<'r>(&'r self) -> BlockReader<'r>[src]
impl Block[src]
pub fn as_advanced_builder(&self) -> BlockBuilder[src]
Creates an advanced builder base on current data.
impl Block[src]
pub fn into_view_without_reset_header(self) -> BlockView[src]
Calculates transaction associated hashes and converts them into BlockView.
Notice
BlockView created by this method could have invalid hashes or
invalid merkle roots in the header.
pub fn into_view(self) -> BlockView[src]
Calculates transaction associated hashes, resets all hashes and merkle roots in the header, then converts them into BlockView.
impl Block[src]
pub fn calc_header_hash(&self) -> Byte32[src]
Calls BlockReader.calc_header_hash() for self.as_reader().
impl Block[src]
pub fn calc_proposals_hash(&self) -> Byte32[src]
impl Block[src]
pub fn calc_uncles_hash(&self) -> Byte32[src]
Calls BlockReader.calc_uncles_hash() for self.as_reader().
impl Block[src]
pub fn calc_tx_hashes(&self) -> Vec<Byte32>[src]
Calls BlockReader.calc_tx_hashes() for self.as_reader().
impl Block[src]
pub fn calc_tx_witness_hashes(&self) -> Vec<Byte32>[src]
impl Block[src]
pub fn serialized_size_without_uncle_proposals(&self) -> usize[src]
impl Block[src]
pub fn as_uncle(&self) -> UncleBlock[src]
Converts self to an uncle block.
pub fn reset_header(self) -> Block[src]
Recalculates all hashes and merkle roots in the header.
Trait Implementations
impl Clone for Block[src]
impl Debug for Block[src]
impl Default for Block[src]
impl Display for Block[src]
impl Entity for Block[src]
type Builder = BlockBuilder
const NAME: &'static str[src]
fn new_unchecked(data: Bytes) -> Self[src]
fn as_bytes(&self) -> Bytes[src]
fn as_slice(&self) -> &[u8][src]
fn from_slice(slice: &[u8]) -> VerificationResult<Self>[src]
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>[src]
fn new_builder() -> Self::Builder[src]
fn as_builder(self) -> Self::Builder[src]
impl Eq for Block[src]
impl Hash for Block[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl LowerHex for Block[src]
impl PartialEq<Block> for Block[src]
Auto Trait Implementations
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,