Trait grin_core::ser::Writeable

source ·
pub trait Writeable {
    // Required method
    fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>;
}
Expand description

Trait that every type that can be serialized as binary must implement. Writes directly to a Writer, a utility type thinly wrapping an underlying Write implementation.

Required Methods§

source

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

Write the data held by this Writeable to the provided writer

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Writeable for i32

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for i64

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for u8

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for u16

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for u32

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for u64

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for BlindingFactor

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for Identifier

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for PublicKey

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for Commitment

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for RangeProof

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl Writeable for Signature

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

impl<'a, A: Writeable> Writeable for &'a A

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

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

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

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

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

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

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

source§

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

source§

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>

Implementors§

source§

impl Writeable for Inputs

source§

impl Writeable for KernelFeatures

source§

impl Writeable for OutputFeatures

source§

impl Writeable for Block

Implementation of Writeable for a block, defines how to write the block to a binary writer. Differentiates between writing the block for the purpose of full serialization and the one of just extracting a hash.

source§

impl Writeable for BlockHeader

Serialization of a block header

source§

impl Writeable for HeaderEntry

source§

impl Writeable for HeaderVersion

source§

impl Writeable for BlockSums

source§

impl Writeable for CompactBlock

Implementation of Writeable for a compact block, defines how to write the block to a binary writer. Differentiates between writing the block for the purpose of full serialization and the one of just extracting a hash.

source§

impl Writeable for CompactBlockBody

source§

impl Writeable for Hash

source§

impl Writeable for ShortId

source§

impl Writeable for MerkleProof

source§

impl Writeable for SegmentIdentifier

source§

impl Writeable for SegmentProof

source§

impl Writeable for CommitWrapper

source§

impl Writeable for FeeFields

source§

impl Writeable for Input

Implementation of Writeable for a transaction Input, defines how to write an Input as binary.

source§

impl Writeable for NRDRelativeHeight

source§

impl Writeable for Output

Implementation of Writeable for a transaction Output, defines how to write an Output as binary.

source§

impl Writeable for OutputIdentifier

source§

impl Writeable for Transaction

Implementation of Writeable for a fully blinded transaction, defines how to write the transaction as binary.

source§

impl Writeable for TransactionBody

Implementation of Writeable for a body, defines how to write the body as binary.

source§

impl Writeable for TxKernel

source§

impl Writeable for Difficulty

source§

impl Writeable for Proof

source§

impl Writeable for ProofOfWork

source§

impl Writeable for ProtocolVersion

source§

impl<T: Writeable> Writeable for Segment<T>