derive

Trait ConsensusDecode

Source
pub trait ConsensusDecode: Sized {
    // Required method
    fn consensus_decode(
        reader: &mut impl Read,
    ) -> Result<Self, ConsensusDecodeError>;

    // Provided method
    fn consensus_deserialize(
        bytes: impl AsRef<[u8]>,
    ) -> Result<Self, ConsensusDecodeError> { ... }
}

Required Methods§

Source

fn consensus_decode( reader: &mut impl Read, ) -> Result<Self, ConsensusDecodeError>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ConsensusDecode for i32

Source§

impl ConsensusDecode for u8

Source§

impl ConsensusDecode for u16

Source§

impl ConsensusDecode for u32

Source§

impl ConsensusDecode for u64

Source§

impl ConsensusDecode for [u8; 32]

Source§

impl<T, const MIN_LEN: usize> ConsensusDecode for Confined<Vec<T>, MIN_LEN, bc::::coding::VarIntArray::{constant#1}>
where T: ConsensusDecode,

Source§

fn consensus_decode( reader: &mut impl Read, ) -> Result<Confined<Vec<T>, MIN_LEN, bc::::coding::VarIntArray::{constant#1}>, ConsensusDecodeError>

Implementors§