[−][src]Trait elephantry::Composite
Trait to convert rust struct to composite type.
Required methods
fn name() -> &'static str
Composite type name.
fn to_vec(&self) -> Vec<&dyn ToSql>
Convert struct to a vector of SQL value.
fn from_text_values(ty: &Type, values: &[Option<&str>]) -> Result<Box<Self>>
Create a new struct from SQL result in text format.
fn from_binary_values(ty: &Type, values: &[Option<&[u8]>]) -> Result<Box<Self>>
Create a new struct from SQL result in binary format.
Provided methods
fn to_sql(&self) -> Result<Option<Vec<u8>>>
fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Box<Self>>
fn from_text(ty: &Type, raw: Option<&str>) -> Result<Box<Self>>
Implementors
impl<E: Enum> Composite for E
[src]
fn name() -> &'static str
[src]
fn to_sql(&self) -> Result<Option<Vec<u8>>>
[src]
fn from_text(_: &Type, raw: Option<&str>) -> Result<Box<Self>>
[src]
fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Box<Self>>
[src]
fn to_vec(&self) -> Vec<&dyn ToSql>
[src]
fn from_text_values(_: &Type, _: &[Option<&str>]) -> Result<Box<Self>>
[src]
fn from_binary_values(
_ty: &Type,
_values: &[Option<&[u8]>]
) -> Result<Box<Self>>
[src]
_ty: &Type,
_values: &[Option<&[u8]>]
) -> Result<Box<Self>>