pub trait TupleBinding<T>: EntryBinding<T> {
// Required methods
fn tuple_to_object(&self, input: &mut TupleInput) -> Result<T>;
fn object_to_tuple(
&self,
object: &T,
output: &mut TupleOutput,
) -> Result<()>;
// Provided method
fn entry_to_input(entry: &DatabaseEntry) -> TupleInput { ... }
}Expand description
A binding that uses TupleInput and TupleOutput to serialize/deserialize
values of type T.
Implementors define tuple_to_object and object_to_tuple to convert
between a type and its tuple-encoded byte representation.
Required Methods§
Sourcefn tuple_to_object(&self, input: &mut TupleInput) -> Result<T>
fn tuple_to_object(&self, input: &mut TupleInput) -> Result<T>
Sourcefn object_to_tuple(&self, object: &T, output: &mut TupleOutput) -> Result<()>
fn object_to_tuple(&self, object: &T, output: &mut TupleOutput) -> Result<()>
Provided Methods§
Sourcefn entry_to_input(entry: &DatabaseEntry) -> TupleInput
fn entry_to_input(entry: &DatabaseEntry) -> TupleInput
Creates a TupleInput from a DatabaseEntry.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".