Trait winter_verifier::Serializable
source · pub trait Serializable: Sized {
fn write_into<W>(&self, target: &mut W)
where
W: ByteWriter;
fn to_bytes(&self) -> Vec<u8, Global> { ... }
fn write_batch_into<W>(source: &[Self], target: &mut W)
where
W: ByteWriter,
{ ... }
fn get_size_hint(&self) -> usize { ... }
}
Expand description
Defines how to serialize Self
into bytes.
Required Methods
sourcefn 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
sourcefn write_batch_into<W>(source: &[Self], target: &mut W)where
W: ByteWriter,
fn write_batch_into<W>(source: &[Self], target: &mut W)where
W: ByteWriter,
Serializes all elements of the source
and writes these bytes into the target
.
This method does not write any metadata (e.g. number of serialized elements) into the
target
.
sourcefn 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.
Implementations on Foreign Types
sourceimpl Serializable for TraceLayout
impl Serializable for TraceLayout
sourcefn 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
.
sourceimpl Serializable for Context
impl Serializable for Context
sourcefn 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
.
sourceimpl Serializable for OodFrame
impl Serializable for OodFrame
sourcefn 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
.
sourceimpl Serializable for Commitments
impl Serializable for Commitments
sourcefn 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
.
sourceimpl Serializable for Queries
impl Serializable for Queries
sourcefn 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
.
sourceimpl Serializable for FriProof
impl Serializable for FriProof
sourcefn 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.