pub trait Serializable {
    // Required method
    fn write_into<W>(&self, target: &mut W)
       where W: ByteWriter;

    // Provided methods
    fn to_bytes(&self) -> Vec<u8>  { ... }
    fn get_size_hint(&self) -> usize { ... }
}
Expand description

Defines how to serialize Self into bytes.

Required Methods§

source

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self into bytes and writes these bytes into the target.

Provided Methods§

source

fn to_bytes(&self) -> Vec<u8>

Serializes self into a vector of bytes.

source

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

The default implementation returns zero.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Serializable for HashFunction

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for AdviceInjectorNode

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for Instruction

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for Node

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for FieldExtension

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

source§

impl Serializable for u8

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for u16

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for u32

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for u64

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for u128

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ()

source§

fn write_into<W>(&self, _target: &mut W)
where W: ByteWriter,

source§

impl Serializable for usize

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for PublicInputs

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ModuleImports

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ProcReExport

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ProcedureAst

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ProcedureId

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for ProcedureName

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for SourceLocation

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for Kernel

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for TraceLayout

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

impl Serializable for ProofOptions

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

impl Serializable for Commitments

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

source§

impl Serializable for Context

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

impl Serializable for OodFrame

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

source§

impl Serializable for Queries

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

source§

impl Serializable for StarkProof

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for FriProof

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target writer.

source§

impl Serializable for BaseElement

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl Serializable for BaseElement

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<B> Serializable for CubeExtension<B>
where B: ExtensibleField<3>,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<B> Serializable for QuadExtension<B>
where B: ExtensibleField<2>,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1> Serializable for (T1,)
where T1: Serializable,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1, T2> Serializable for (T1, T2)
where T1: Serializable, T2: Serializable,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1, T2, T3> Serializable for (T1, T2, T3)

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1, T2, T3, T4> Serializable for (T1, T2, T3, T4)

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1, T2, T3, T4, T5> Serializable for (T1, T2, T3, T4, T5)

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T1, T2, T3, T4, T5, T6> Serializable for (T1, T2, T3, T4, T5, T6)

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T> Serializable for Option<T>
where T: Serializable,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T> Serializable for &T
where T: Serializable,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

source§

impl<T, const C: usize> Serializable for [T; C]
where T: Serializable,

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Implementors§

source§

impl Serializable for AuthData

source§

impl Serializable for Asset

source§

impl Serializable for SmtLeaf

source§

impl Serializable for AccountDelta

source§

impl Serializable for AccountStorageDelta

source§

impl Serializable for AccountVaultDelta

source§

impl Serializable for Account

source§

impl Serializable for AccountCode

source§

impl Serializable for AccountData

source§

impl Serializable for AccountId

source§

impl Serializable for AccountStorage

source§

impl Serializable for AstSerdeOptions

source§

impl Serializable for LibraryNamespace

source§

impl Serializable for LibraryPath

source§

impl Serializable for MaslLibrary

source§

impl Serializable for Version

source§

impl Serializable for AssetVault

source§

impl Serializable for BlockHeader

source§

impl Serializable for KeyPair

source§

impl Serializable for Signature

source§

impl Serializable for RpxDigest

source§

impl Serializable for MerklePath

source§

impl Serializable for NodeIndex

source§

impl Serializable for PartialMerkleTree

source§

impl Serializable for RootPath

source§

impl Serializable for SmtProof

source§

impl Serializable for StoreNode

source§

impl Serializable for ValuePath

source§

impl Serializable for RpoRandomCoin

source§

impl Serializable for Note

source§

impl Serializable for NoteAssets

source§

impl Serializable for NoteEnvelope

source§

impl Serializable for NoteId

source§

impl Serializable for NoteInclusionProof

source§

impl Serializable for NoteInputs

source§

impl Serializable for NoteMetadata

source§

impl Serializable for NoteOrigin

source§

impl Serializable for NoteScript

source§

impl Serializable for Nullifier

source§

impl Serializable for RpoDigest

source§

impl Serializable for miden_objects::Felt

source§

impl Serializable for InputNote

source§

impl Serializable for OutputNote

source§

impl Serializable for ProvenTransaction

source§

impl Serializable for TransactionId

source§

impl Serializable for ExecutionProof

source§

impl Serializable for ProgramInfo

source§

impl Serializable for StackInputs

source§

impl Serializable for StackOutputs

source§

impl<T> Serializable for MerkleStore<T>

source§

impl<T: ToEnvelope> Serializable for OutputNotes<T>

source§

impl<T: ToNullifier> Serializable for InputNotes<T>

source§

impl<const N: usize> Serializable for Blake3Digest<N>