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