[][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<T, DB> Encode<DB> for Option<T> where
    DB: Database + HasSqlType<T>,
    T: Encode<DB>, 
[src]

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

Loading content...

Implementors

Loading content...