Trait AsTuple

Source
pub trait AsTuple: Serialize {
    // Provided method
    fn serialize_as_tuple(&self) -> Result<TupleBuffer, Error> { ... }
}
Expand description

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, Error>

Describes how object can be converted to Tuple.

Has default implementation, but can be overloaded for special cases

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AsTuple for ()

Source§

impl<T> AsTuple for (T,)
where T: Serialize,

Source§

impl<T> AsTuple for Vec<T>
where T: Serialize,

Source§

impl<Ta, Tb> AsTuple for (Ta, Tb)
where Ta: Serialize, Tb: Serialize,

Source§

impl<Ta, Tb, Tc> AsTuple for (Ta, Tb, Tc)
where Ta: Serialize, Tb: Serialize, Tc: Serialize,

Source§

impl<Ta, Tb, Tc, Td> AsTuple for (Ta, Tb, Tc, Td)
where Ta: Serialize, Tb: Serialize, Tc: Serialize, Td: Serialize,

Implementors§