Trait tantivy_sstable::value::ValueWriter
source · pub trait ValueWriter: Default {
type Value;
// Required methods
fn write(&mut self, val: &Self::Value);
fn serialize_block(&self, output: &mut Vec<u8>);
fn clear(&mut self);
}
Expand description
ValueWriter
is a trait to make it possible to write blocks
of value.
Required Associated Types§
Required Methods§
sourcefn write(&mut self, val: &Self::Value)
fn write(&mut self, val: &Self::Value)
Records a new value.
This method usually just accumulates data in a Vec
,
only to be serialized on the call to ValueWriter::serialize_block
.
sourcefn serialize_block(&self, output: &mut Vec<u8>)
fn serialize_block(&self, output: &mut Vec<u8>)
Serializes the accumulated values into the output buffer.
Object Safety§
This trait is not object safe.