[][src]Trait elephantry::FromSql

pub trait FromSql: Sized {
    pub fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Self>;
pub fn from_text(ty: &Type, raw: Option<&str>) -> Result<Self>; pub fn from_sql(
        ty: &Type,
        format: Format,
        raw: Option<&[u8]>
    ) -> Result<Self> { ... }
pub fn error<T: Debug>(pg_type: &Type, rust_type: &str, raw: T) -> Error { ... } }

Trait to allow a rust type to be translated form a SQL value.

Required methods

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

Create a new struct from the binary representation.

See the postgresql adt module source code, mainly *_send functions.

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

Create a new struct from the text representation.

Loading content...

Provided methods

pub fn from_sql(ty: &Type, format: Format, raw: Option<&[u8]>) -> Result<Self>[src]

Create a new struct from SQL value.

pub fn error<T: Debug>(pg_type: &Type, rust_type: &str, raw: T) -> Error[src]

Loading content...

Implementations on Foreign Types

impl FromSql for f32[src]

impl FromSql for f64[src]

impl FromSql for i16[src]

impl FromSql for i32[src]

impl FromSql for i64[src]

impl FromSql for u32[src]

impl FromSql for usize[src]

impl FromSql for bool[src]

impl<T: FromSql> FromSql for Option<T>[src]

impl FromSql for char[src]

impl FromSql for String[src]

impl<T: FromSql> FromSql for Vec<T>[src]

impl FromSql for ()[src]

impl<T: FromSql> FromSql for Range<T>[src]

impl<A: FromSql, B: FromSql> FromSql for (A, B)[src]

impl<A: FromSql, B: FromSql, C: FromSql> FromSql for (A, B, C)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql> FromSql for (A, B, C, D)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql> FromSql for (A, B, C, D, E)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql> FromSql for (A, B, C, D, E, F)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql> FromSql for (A, B, C, D, E, F, G)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql, H: FromSql> FromSql for (A, B, C, D, E, F, G, H)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql, H: FromSql, I: FromSql> FromSql for (A, B, C, D, E, F, G, H, I)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql, H: FromSql, I: FromSql, J: FromSql> FromSql for (A, B, C, D, E, F, G, H, I, J)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql, H: FromSql, I: FromSql, J: FromSql, K: FromSql> FromSql for (A, B, C, D, E, F, G, H, I, J, K)[src]

impl<A: FromSql, B: FromSql, C: FromSql, D: FromSql, E: FromSql, F: FromSql, G: FromSql, H: FromSql, I: FromSql, J: FromSql, K: FromSql, L: FromSql> FromSql for (A, B, C, D, E, F, G, H, I, J, K, L)[src]

Loading content...

Implementors

impl FromSql for Bytea[src]

impl FromSql for Hstore[src]

impl<C: Composite> FromSql for C[src]

impl<T: FromSql> FromSql for Array<T>[src]

Loading content...