pub trait Encode {
    fn encode<W: Write>(&self, w: &mut W, tuple_depth: TupleDepth) -> Result<()>;

    fn encode_to<W: Write>(&self, w: &mut W) -> Result<()> { ... }
    fn to_vec(&self) -> Vec<u8>  { ... }
}
Expand description

For types that are encodable as defined by the tuple definitions on FoundationDB

Required Methods§

Encodes this tuple/element into the associated Write

Arguments
  • w - a Write to put the self as FoundationDB encoded bytes
  • tuple_depth - the current depth in recursive tuple-like datastructures, it should be incremented only when encoding a tuple inside another object, see encode_to for a method which can initialize the TupleDepth.

Provided Methods§

Encodes this tuple/element into the associated Write

Arguments
  • w - a Write to put the self as FoundationDB encoded bytes

Encodes this tuple/element into a new Vec

Implementations on Foreign Types§

Implementors§