Trait tarantool::tuple::AsTuple

source ·
pub trait AsTuple: Serialize {
    // Provided methods
    fn serialize_as_tuple(&self) -> Result<TupleBuffer> { ... }
    fn serialize(&self) -> Result<Vec<u8>> { ... }
    fn serialize_to(&self, w: &mut impl Write) -> Result<()> { ... }
}
👎Deprecated: This is a legacy trait which will be removed in future. Implement Encode for custom types instead. Use ToTupleBuffer if you need the tuple data instead.
Expand description

AsTuple Must be implemented for types, which will be used with box access methods as data

Provided Methods§

source

fn serialize_as_tuple(&self) -> Result<TupleBuffer>

👎Deprecated: This is a legacy trait which will be removed in future. Implement Encode for custom types instead. Use ToTupleBuffer if you need the tuple data instead.

Describes how object can be converted to Tuple.

Has default implementation, but can be overloaded for special cases

source

fn serialize(&self) -> Result<Vec<u8>>

👎Deprecated: This is a legacy trait which will be removed in future. Implement Encode for custom types instead. Use ToTupleBuffer if you need the tuple data instead.
source

fn serialize_to(&self, w: &mut impl Write) -> Result<()>

👎Deprecated: This is a legacy trait which will be removed in future. Implement Encode for custom types instead. Use ToTupleBuffer if you need the tuple data instead.

Implementors§

source§

impl<T> AsTuple for Twhere T: ?Sized + Encode,