[−][src]Trait sqlx_core::encode::Encode
Encode a single value to be sent to the database.
Required methods
#[must_use]fn encode_by_ref(
&self,
buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
&self,
buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
Writes the value of self into buf without moving self.
Where possible, make use of encode instead as it can take advantage of re-using
memory.
Provided methods
#[must_use]fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
Self: Sized,
Writes the value of self into buf in the expected format for the database.
fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Implementations on Foreign Types
impl<'q, T, DB: Database, '_> Encode<'q, DB> for &'_ T where
T: Encode<'q, DB>, [src]
T: Encode<'q, DB>,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull[src]
fn encode_by_ref(
&self,
buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer
) -> IsNull[src]
&self,
buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer
) -> IsNull