Decodable

Trait Decodable 

Source
pub trait Decodable: Sized {
    // Required method
    fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>;
}
Expand description

Data which can be encoded in a consensus-consistent way

Required Methods§

Source

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Decode an object with a well-defined format

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 Decodable for Cow<'static, str>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Cow<'static, str>, Error>

Source§

impl Decodable for bool

Source§

impl Decodable for i8

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for i16

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for i32

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for i64

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for u8

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for u16

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for u32

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for u64

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Box<[u8]>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for String

Source§

impl Decodable for Vec<(u32, Address)>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<Inventory>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<u8>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<u64>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<Transaction>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<TxIn>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<TxOut>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<BlockHash>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<FilterHash>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<FilterHeader>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<TxMerkleNode>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<AddrV2Message>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Vec<Vec<u8>>

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for Hash

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 2]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 4]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 8]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 10]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 12]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 16]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 32]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u8; 33]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl Decodable for [u16; 8]

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable> Decodable for (T0, T1)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable> Decodable for (T0, T1, T2)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable, T3: Decodable> Decodable for (T0, T1, T2, T3)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable, T3: Decodable, T4: Decodable> Decodable for (T0, T1, T2, T3, T4)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable, T3: Decodable, T4: Decodable, T5: Decodable> Decodable for (T0, T1, T2, T3, T4, T5)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable, T3: Decodable, T4: Decodable, T5: Decodable, T6: Decodable> Decodable for (T0, T1, T2, T3, T4, T5, T6)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Source§

impl<T0: Decodable, T1: Decodable, T2: Decodable, T3: Decodable, T4: Decodable, T5: Decodable, T6: Decodable, T7: Decodable> Decodable for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>

Implementors§

Source§

impl Decodable for AddrV2

Source§

impl Decodable for Inventory

Source§

impl Decodable for RejectReason

Source§

impl Decodable for Block

Source§

impl Decodable for BlockHeader

Source§

impl Decodable for Script

Source§

impl Decodable for OutPoint

Source§

impl Decodable for Transaction

Source§

impl Decodable for TxIn

Source§

impl Decodable for TxOut

Source§

impl Decodable for BlockHash

Source§

impl Decodable for FilterHash

Source§

impl Decodable for FilterHeader

Source§

impl Decodable for SigHash

Source§

impl Decodable for TxMerkleNode

Source§

impl Decodable for Txid

Source§

impl Decodable for WitnessMerkleNode

Source§

impl Decodable for Wtxid

Source§

impl Decodable for AddrV2Message

Source§

impl Decodable for Address

Source§

impl Decodable for ServiceFlags

Source§

impl Decodable for CommandString

Source§

impl Decodable for RawNetworkMessage

Source§

impl Decodable for GetBlocksMessage

Source§

impl Decodable for GetHeadersMessage

Source§

impl Decodable for CFCheckpt

Source§

impl Decodable for CFHeaders

Source§

impl Decodable for CFilter

Source§

impl Decodable for GetCFCheckpt

Source§

impl Decodable for GetCFHeaders

Source§

impl Decodable for GetCFilters

Source§

impl Decodable for Reject

Source§

impl Decodable for VersionMessage

Source§

impl Decodable for MerkleBlock

Source§

impl Decodable for PartialMerkleTree

Source§

impl Decodable for Key

Source§

impl Decodable for Pair

Source§

impl Decodable for Global

Source§

impl Decodable for Input

Source§

impl Decodable for Output

Source§

impl Decodable for PartiallySignedTransaction

Source§

impl Decodable for Uint128

Source§

impl Decodable for Uint256

Source§

impl Decodable for CheckedData

Source§

impl Decodable for VarInt

Source§

impl<Subtype> Decodable for ProprietaryKey<Subtype>
where Subtype: Copy + From<u8> + Into<u8>,