Decodable

Trait Decodable 

Source
pub trait Decodable {
    type Decoder: Decoder<Output = Self>;

    // Required method
    fn decoder() -> Self::Decoder;
}
Expand description

A Bitcoin object which can be consensus-decoded using a push decoder.

To decode something, create a Self::Decoder and push byte slices into it with Decoder::push_bytes, then call Decoder::end to get the result.

Required Associated Types§

Source

type Decoder: Decoder<Output = Self>

Associated decoder for the type.

Required Methods§

Source

fn decoder() -> Self::Decoder

Constructs a “default decoder” for the type.

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.

Implementors§