Trait miden_processor::utils::Serializable

source ·
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 &PubKeyPoly

source§

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

source§

impl Serializable for &SignatureHeader

source§

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

source§

impl Serializable for &SignaturePoly

source§

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

source§

impl Serializable for &Nonce

source§

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

source§

impl Serializable for HashFunction

source§

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

source§

impl Serializable for SmtLeaf

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 str

source§

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

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 String

source§

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

source§

impl Serializable for ExecutionProof

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 SourceSpan

source§

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

source§

impl Serializable for SecretKey

source§

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

source§

impl Serializable for Signature

source§

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

source§

impl Serializable for RootPath

source§

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

source§

impl Serializable for ValuePath

source§

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

source§

impl Serializable for SmtProof

source§

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

source§

impl Serializable for Smt

source§

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

source§

impl Serializable for StoreNode

source§

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

source§

impl Serializable for TraceInfo

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 Proof

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<K, V> Serializable for BTreeMap<K, V>

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> Serializable for [T]
where T: Serializable,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T> Serializable for Span<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,

source§

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

source§

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

Implementors§