Trait tantivy_common::BinarySerializable
source · pub trait BinarySerializable: Debug + Sized {
// Required methods
fn serialize<W: Write + ?Sized>(&self, writer: &mut W) -> Result<()>;
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>;
// Provided method
fn num_bytes(&self) -> u64 { ... }
}
Expand description
Trait for a simple binary serialization.
Required Methods§
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>
Deserialize
Provided Methods§
Object Safety§
This trait is not object safe.