Trait grin_core::ser::Readable

source ·
pub trait Readable
where Self: Sized,
{ // Required method fn read<R: Reader>(reader: &mut R) -> Result<Self, Error>; }
Expand description

Trait that every type that can be deserialized from binary must implement. Reads directly to a Reader, a utility type thinly wrapping an underlying Read implementation.

Required Methods§

source

fn read<R: Reader>(reader: &mut R) -> Result<Self, Error>

Reads the data necessary to this Readable from the provided reader

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Readable for i32

source§

fn read<R: Reader>(reader: &mut R) -> Result<i32, Error>

source§

impl Readable for i64

source§

fn read<R: Reader>(reader: &mut R) -> Result<i64, Error>

source§

impl Readable for u8

source§

fn read<R: Reader>(reader: &mut R) -> Result<u8, Error>

source§

impl Readable for u16

source§

fn read<R: Reader>(reader: &mut R) -> Result<u16, Error>

source§

impl Readable for u32

source§

fn read<R: Reader>(reader: &mut R) -> Result<u32, Error>

source§

impl Readable for u64

source§

fn read<R: Reader>(reader: &mut R) -> Result<u64, Error>

source§

impl Readable for BlindingFactor

source§

impl Readable for Identifier

source§

impl Readable for PublicKey

source§

fn read<R: Reader>(reader: &mut R) -> Result<Self, Error>

source§

impl Readable for Commitment

source§

impl Readable for RangeProof

source§

impl Readable for Signature

source§

impl<A: Readable, B: Readable> Readable for (A, B)

source§

impl<A: Readable, B: Readable, C: Readable> Readable for (A, B, C)

source§

impl<A: Readable, B: Readable, C: Readable, D: Readable> Readable for (A, B, C, D)

source§

impl<T> Readable for Vec<T>
where T: Readable,

source§

fn read<R: Reader>(reader: &mut R) -> Result<Vec<T>, Error>

Implementors§

source§

impl Readable for KernelFeatures

source§

impl Readable for OutputFeatures

source§

impl Readable for Block

Implementation of Readable for a block, defines how to read a full block from a binary stream.

source§

impl Readable for BlockHeader

Deserialization of a block header

source§

impl Readable for HeaderEntry

source§

impl Readable for HeaderVersion

source§

impl Readable for UntrustedBlock

Deserialization of an untrusted block header

source§

impl Readable for UntrustedBlockHeader

Deserialization of an untrusted block header

source§

impl Readable for BlockSums

source§

impl Readable for CompactBlock

Implementation of Readable for a compact block, defines how to read a compact block from a binary stream.

source§

impl Readable for CompactBlockBody

source§

impl Readable for UntrustedCompactBlock

Implementation of Readable for an untrusted compact block, defines how to read a compact block from a binary stream.

source§

impl Readable for Hash

source§

impl Readable for ShortId

source§

impl Readable for MerkleProof

source§

impl Readable for SegmentIdentifier

source§

impl Readable for SegmentProof

source§

impl Readable for CommitWrapper

source§

impl Readable for FeeFields

source§

impl Readable for Input

Implementation of Readable for a transaction Input, defines how to read an Input from a binary stream.

source§

impl Readable for NRDRelativeHeight

source§

impl Readable for Output

Implementation of Readable for a transaction Output, defines how to read an Output from a binary stream.

source§

impl Readable for OutputIdentifier

source§

impl Readable for Transaction

Implementation of Readable for a transaction, defines how to read a full transaction from a binary stream.

source§

impl Readable for TransactionBody

Implementation of Readable for a body, defines how to read a body from a binary stream.

source§

impl Readable for TxKernel

source§

impl Readable for Difficulty

source§

impl Readable for Proof

source§

impl Readable for ProofOfWork

source§

impl Readable for ProtocolVersion

source§

impl<T: Readable> Readable for Segment<T>