pub trait CanonicalSerializeWithFlags: CanonicalSerialize {
// Required methods
fn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: W,
flags: F,
) -> Result<(), SerializationError>;
fn serialized_size_with_flags<F: Flags>(&self) -> usize;
}
Expand description
Serializer in little endian format allowing to encode flags.
Required Methods§
Sourcefn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: W,
flags: F,
) -> Result<(), SerializationError>
fn serialize_with_flags<W: Write, F: Flags>( &self, writer: W, flags: F, ) -> Result<(), SerializationError>
Serializes self
and flags
into writer
.
Sourcefn serialized_size_with_flags<F: Flags>(&self) -> usize
fn serialized_size_with_flags<F: Flags>(&self) -> usize
Serializes self
and flags
into writer
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.