Trait miden_processor::utils::Serializable
pub trait Serializable: Sized {
// 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§
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self into bytes and writes these bytes into the target.
Provided Methods§
fn get_size_hint(&self) -> usize
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§
Implementations on Foreign Types§
source§impl Serializable for HashFunction
impl Serializable for HashFunction
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for u8
impl Serializable for u8
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for u16
impl Serializable for u16
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for u32
impl Serializable for u32
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for u64
impl Serializable for u64
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for u128
impl Serializable for u128
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for ()
impl Serializable for ()
fn write_into<W>(&self, _target: &mut W)where
W: ByteWriter,
§impl Serializable for usize
impl Serializable for usize
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
source§impl Serializable for ExecutionProof
impl Serializable for ExecutionProof
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
source§impl Serializable for PublicInputs
impl Serializable for PublicInputs
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for BaseElement
impl Serializable for BaseElement
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for BaseElement
impl Serializable for BaseElement
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for Commitments
impl Serializable for Commitments
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self.
§impl Serializable for Context
impl Serializable for Context
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§impl Serializable for FieldExtension
impl Serializable for FieldExtension
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self.
§impl Serializable for FriProof
impl Serializable for FriProof
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target writer.
§impl Serializable for KeyPair
impl Serializable for KeyPair
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for OodFrame
impl Serializable for OodFrame
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self.
§impl Serializable for ProofOptions
impl Serializable for ProofOptions
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§impl Serializable for Queries
impl Serializable for Queries
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self.
§impl Serializable for RootPath
impl Serializable for RootPath
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for RpxDigest
impl Serializable for RpxDigest
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for Signature
impl Serializable for Signature
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for SmtLeaf
impl Serializable for SmtLeaf
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for SmtProof
impl Serializable for SmtProof
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for StarkProof
impl Serializable for StarkProof
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for StoreNode
impl Serializable for StoreNode
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
§impl Serializable for TraceLayout
impl Serializable for TraceLayout
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes self and writes the resulting bytes into the target.