pub trait SSTableValue:
Clone
+ Send
+ Sync {
// Required methods
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()>;
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>;
}Expand description
A value that can be stored in an SSTableWriter and read by an
AsyncSSTableReader.
Implementations form part of the on-disk format. deserialize must consume
exactly the bytes written by one serialize call so the block decoder can
continue at the following entry.
Required Methods§
Sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<()>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()>
Append this value’s binary representation to writer.
Sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self>
Read one value from reader, leaving subsequent entry bytes untouched.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SSTableValue for Vec<u8>
Vec<u8> value implementation
impl SSTableValue for Vec<u8>
Vec<u8> value implementation
Source§impl SSTableValue for u64
u64 value implementation
impl SSTableValue for u64
u64 value implementation