[][src]Trait sqlx::encode::Encode

pub trait Encode<DB> where
    DB: Database + ?Sized
{ fn encode(&self, buf: &mut Vec<u8>); fn encode_nullable(&self, buf: &mut Vec<u8>) -> IsNull { ... }
fn size_hint(&self) -> usize { ... } }

Encode a single value to be sent to the database.

Required methods

fn encode(&self, buf: &mut Vec<u8>)

Writes the value of self into buf in the expected format for the database.

Loading content...

Provided methods

fn encode_nullable(&self, buf: &mut Vec<u8>) -> IsNull

fn size_hint(&self) -> usize

Loading content...

Implementations on Foreign Types

impl Encode<Postgres> for [u8][src]

impl Encode<MySql> for i64[src]

impl Encode<Postgres> for Vec<u8>[src]

impl Encode<Postgres> for i32[src]

impl Encode<MySql> for u64[src]

impl Encode<Postgres> for f64[src]

impl Encode<MySql> for u32[src]

impl<'_, T, DB> Encode<DB> for &'_ T where
    DB: Database + HasSqlType<T>,
    T: Encode<DB> + ?Sized
[src]

impl Encode<MySql> for u16[src]

impl Encode<Postgres> for i16[src]

impl Encode<MySql> for str[src]

impl Encode<Postgres> for bool[src]

impl<T, DB> Encode<DB> for Option<T> where
    DB: Database + HasSqlType<T>,
    T: Encode<DB>, 
[src]

impl Encode<MySql> for String[src]

impl Encode<Postgres> for i64[src]

impl Encode<MySql> for f64[src]

impl Encode<MySql> for i8[src]

impl Encode<Postgres> for str[src]

impl Encode<Postgres> for String[src]

impl Encode<MySql> for f32[src]

impl Encode<MySql> for [u8][src]

impl Encode<MySql> for i16[src]

impl Encode<MySql> for i32[src]

impl Encode<MySql> for Vec<u8>[src]

impl Encode<Postgres> for f32[src]

impl Encode<MySql> for u8[src]

impl Encode<MySql> for bool[src]

Loading content...

Implementors

impl Encode<MySql> for DateTime<Utc>[src]

impl Encode<MySql> for NaiveDate[src]

impl Encode<MySql> for NaiveDateTime[src]

impl Encode<MySql> for NaiveTime[src]

impl Encode<Postgres> for NaiveDate[src]

impl Encode<Postgres> for NaiveDateTime[src]

impl Encode<Postgres> for NaiveTime[src]

impl Encode<Postgres> for Uuid[src]

impl<Tz> Encode<Postgres> for DateTime<Tz> where
    Tz: TimeZone,
    <Tz as TimeZone>::Offset: Copy
[src]

Loading content...