Trait elephantry::Composite[][src]

pub trait Composite {
    fn name() -> &'static str;
fn to_vec(&self) -> Vec<&dyn ToSql>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
;
fn from_text_values(ty: &Type, values: &[Option<&str>]) -> Result<Box<Self>>;
fn from_binary_values(
        ty: &Type,
        values: &[Option<&[u8]>]
    ) -> Result<Box<Self>>; 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>> { ... } }

Trait to convert rust struct to composite type.

Required methods

fn name() -> &'static str[src]

Composite type name.

fn to_vec(&self) -> Vec<&dyn ToSql>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
[src]

Convert struct to a vector of SQL value.

fn from_text_values(ty: &Type, values: &[Option<&str>]) -> Result<Box<Self>>[src]

Create a new struct from SQL result in text format.

fn from_binary_values(ty: &Type, values: &[Option<&[u8]>]) -> Result<Box<Self>>[src]

Create a new struct from SQL result in binary format.

Loading content...

Provided methods

fn to_sql(&self) -> Result<Option<Vec<u8>>>[src]

fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Box<Self>>[src]

fn from_text(ty: &Type, raw: Option<&str>) -> Result<Box<Self>>[src]

Loading content...

Implementors

impl<E: Enum> Composite for E[src]

Loading content...