Skip to main content

Encode

Trait Encode 

Source
pub trait Encode<'q, DB>
where DB: Database,
{ // Required method fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>; // Provided methods fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>> where Self: Sized { ... } fn produces(&self) -> Option<<DB as Database>::TypeInfo> { ... } fn size_hint(&self) -> usize { ... } }
Expand description

Encode a single value to be sent to the database.

Required Methodsยง

Source

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

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ยง

Source

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where Self: Sized,

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

Source

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source

fn size_hint(&self) -> usize

Dyn Compatibilityยง

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Typesยง

Sourceยง

impl Encode<'_, Any> for String

Sourceยง

fn encode( self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for Vec<u8>

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for bool

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for f32

Sourceยง

impl Encode<'_, Any> for f64

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for i16

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for i32

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Any> for i64

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for &[u8]

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for &str

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for BigDecimal

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Date

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for DateTime<Local>

Note: assumes the connectionโ€™s time_zone is set to +00:00 (UTC).

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for DateTime<Utc>

Note: assumes the connectionโ€™s time_zone is set to +00:00 (UTC).

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Decimal

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Hyphenated

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for IpAddr

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Ipv4Addr

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Ipv6Addr

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for NaiveDate

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for NaiveDateTime

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for NaiveTime

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for OffsetDateTime

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for PrimitiveDateTime

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for Simple

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Time

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl Encode<'_, MySql> for Uuid

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for Vec<u8>

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for bool

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for f32

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for f64

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for i8

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for i16

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for i32

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for i64

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for u8

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for u16

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for u32

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, MySql> for u64

Sourceยง

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Postgres> for &[u8]

Sourceยง

impl Encode<'_, Postgres> for &str

Sourceยง

impl Encode<'_, Postgres> for BigDecimal

ยงNote: BigDecimal Has a Larger Range than NUMERIC

BigDecimal can represent values with a far, far greater range than the NUMERIC type in Postgres can.

NUMERIC is limited to 131,072 digits before the decimal point, and 16,384 digits after it. See Section 8.1, Numeric Types of the Postgres manual for details.

Meanwhile, BigDecimal can theoretically represent a value with an arbitrary number of decimal digits, albeit with a maximum of 263 significant figures.

Because encoding in the current API design must be infallible, when attempting to encode a BigDecimal that cannot fit in the wire representation of NUMERIC, SQLx may instead encode a sentinel value that falls outside the allowed range but is still representable.

This will cause the query to return a DatabaseError with code 22P03 (invalid_binary_representation) and the error message invalid scale in external "numeric" value (though this may be subject to change).

However, BigDecimal should be able to decode any NUMERIC value except NaN, for which it has no representation.

Sourceยง

impl Encode<'_, Postgres> for BitVec

Sourceยง

impl Encode<'_, Postgres> for Date

Sourceยง

impl Encode<'_, Postgres> for Decimal

Sourceยง

impl Encode<'_, Postgres> for Duration

Sourceยง

impl Encode<'_, Postgres> for Duration

Available on crate feature time only.
Sourceยง

impl Encode<'_, Postgres> for IpNet

Sourceยง

impl Encode<'_, Postgres> for IpNetwork

Sourceยง

impl Encode<'_, Postgres> for MacAddress

Sourceยง

impl Encode<'_, Postgres> for NaiveDate

Sourceยง

impl Encode<'_, Postgres> for NaiveDateTime

Sourceยง

impl Encode<'_, Postgres> for NaiveTime

Sourceยง

impl Encode<'_, Postgres> for OffsetDateTime

Sourceยง

impl Encode<'_, Postgres> for PrimitiveDateTime

Sourceยง

impl Encode<'_, Postgres> for Time

Sourceยง

impl Encode<'_, Postgres> for TimeDelta

Available on crate feature chrono only.
Sourceยง

impl Encode<'_, Postgres> for Uuid

Sourceยง

impl Encode<'_, Postgres> for Vec<u8>

Sourceยง

impl Encode<'_, Postgres> for bool

Sourceยง

impl Encode<'_, Postgres> for f32

Sourceยง

impl Encode<'_, Postgres> for f64

Sourceยง

impl Encode<'_, Postgres> for i8

Sourceยง

impl Encode<'_, Postgres> for i16

Sourceยง

impl Encode<'_, Postgres> for i32

Sourceยง

impl Encode<'_, Postgres> for i64

Sourceยง

impl Encode<'_, Sqlite> for &[u8]

Sourceยง

impl Encode<'_, Sqlite> for &str

Sourceยง

impl Encode<'_, Sqlite> for Arc<[u8]>

Sourceยง

impl Encode<'_, Sqlite> for Arc<str>

Sourceยง

fn encode( self, args: &mut <Sqlite as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where Arc<str>: Sized,

Sourceยง

fn encode_by_ref( &self, args: &mut SqliteArgumentsBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl Encode<'_, Sqlite> for Box<[u8]>

Sourceยง

impl Encode<'_, Sqlite> for Box<str>

Sourceยง

impl Encode<'_, Sqlite> for Cow<'_, [u8]>

Sourceยง

impl Encode<'_, Sqlite> for Cow<'_, str>

Sourceยง

impl Encode<'_, Sqlite> for Date

Sourceยง

impl Encode<'_, Sqlite> for Hyphenated

Sourceยง

impl Encode<'_, Sqlite> for NaiveDate

Sourceยง

impl Encode<'_, Sqlite> for NaiveDateTime

Sourceยง

impl Encode<'_, Sqlite> for NaiveTime

Sourceยง

impl Encode<'_, Sqlite> for OffsetDateTime

Sourceยง

impl Encode<'_, Sqlite> for PrimitiveDateTime

Sourceยง

impl Encode<'_, Sqlite> for Rc<[u8]>

Sourceยง

impl Encode<'_, Sqlite> for Rc<str>

Sourceยง

impl Encode<'_, Sqlite> for Simple

Sourceยง

impl Encode<'_, Sqlite> for String

Sourceยง

impl Encode<'_, Sqlite> for Time

Sourceยง

impl Encode<'_, Sqlite> for Uuid

Sourceยง

impl Encode<'_, Sqlite> for Vec<u8>

Sourceยง

impl Encode<'_, Sqlite> for bool

Sourceยง

impl Encode<'_, Sqlite> for f32

Sourceยง

impl Encode<'_, Sqlite> for f64

Sourceยง

impl Encode<'_, Sqlite> for i8

Sourceยง

impl Encode<'_, Sqlite> for i16

Sourceยง

impl Encode<'_, Sqlite> for i32

Sourceยง

impl Encode<'_, Sqlite> for i64

Sourceยง

impl Encode<'_, Sqlite> for u8

Sourceยง

impl Encode<'_, Sqlite> for u16

Sourceยง

impl Encode<'_, Sqlite> for u32

Sourceยง

impl<'a> Encode<'a, Any> for &'a str

Sourceยง

fn encode( self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where &'a str: Sized,

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'db> Encode<'db, Postgres> for IpAddr
where IpNetwork: Encode<'db, Postgres>,

Sourceยง

impl<'q, DB> Encode<'q, DB> for Box<RawValue>
where Json<&'a Box<RawValue>>: for<'a> Encode<'q, DB>, DB: Database,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<i8>
where DB: Database, i8: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<i8>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<i16>
where DB: Database, i16: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<i16>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<i32>
where DB: Database, i32: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<i32>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<i64>
where DB: Database, i64: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<i64>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<u8>
where DB: Database, u8: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<u8>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<u16>
where DB: Database, u16: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<u16>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<u32>
where DB: Database, u32: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<u32>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, DB> Encode<'q, DB> for NonZero<u64>
where DB: Database, u64: Encode<'q, DB>,

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where NonZero<u64>: Sized,

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

impl<'q, T, DB> Encode<'q, DB> for &T
where DB: Database, T: Encode<'q, DB>,

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl<'q, T, DB> Encode<'q, DB> for Arc<T>
where DB: Database, T: Encode<'q, DB>,

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl<'q, T, DB> Encode<'q, DB> for Box<T>
where DB: Database, T: Encode<'q, DB>,

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl<'q, T, DB> Encode<'q, DB> for Cow<'q, T>
where DB: Database, T: Encode<'q, DB> + ToOwned,

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl<'q, T, DB> Encode<'q, DB> for Rc<T>
where DB: Database, T: Encode<'q, DB>,

Sourceยง

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Sourceยง

fn size_hint(&self) -> usize

Sourceยง

impl<'q, T, const N: usize> Encode<'q, Postgres> for [T; N]
where &'a [T]: for<'a> Encode<'q, Postgres>, T: Encode<'q, Postgres>,

Sourceยง

impl<'q, T> Encode<'q, Any> for Option<T>
where T: Encode<'q, Any> + 'q + Type<Any>,

Sourceยง

impl<'q, T> Encode<'q, MySql> for Option<T>
where T: Encode<'q, MySql> + Type<MySql> + 'q,

Sourceยง

impl<'q, T> Encode<'q, Postgres> for &[T]
where T: Encode<'q, Postgres> + Type<Postgres>,

Sourceยง

impl<'q, T> Encode<'q, Postgres> for Option<T>
where T: Encode<'q, Postgres> + Type<Postgres> + 'q,

Sourceยง

impl<'q, T> Encode<'q, Postgres> for Vec<T>
where &'a [T]: for<'a> Encode<'q, Postgres>, T: Encode<'q, Postgres>,

Sourceยง

impl<'q, T> Encode<'q, Sqlite> for Option<T>
where T: Encode<'q, Sqlite> + Type<Sqlite> + 'q,

Sourceยง

impl<'q> Encode<'q, Any> for &'q [u8]

Sourceยง

fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'q> Encode<'q, MySql> for Arc<[u8]>

Sourceยง

impl<'q> Encode<'q, MySql> for Arc<str>

Sourceยง

impl<'q> Encode<'q, MySql> for Box<[u8]>

Sourceยง

impl<'q> Encode<'q, MySql> for Box<str>

Sourceยง

impl<'q> Encode<'q, MySql> for Cow<'_, [u8]>

Sourceยง

impl<'q> Encode<'q, MySql> for Cow<'_, str>

Sourceยง

impl<'q> Encode<'q, MySql> for Rc<[u8]>

Sourceยง

impl<'q> Encode<'q, MySql> for Rc<str>

Sourceยง

impl<'q> Encode<'q, MySql> for String

Sourceยง

impl<'q> Encode<'q, Postgres> for Arc<[u8]>

Sourceยง

impl<'q> Encode<'q, Postgres> for Arc<str>

Sourceยง

impl<'q> Encode<'q, Postgres> for Box<[u8]>

Sourceยง

impl<'q> Encode<'q, Postgres> for Box<str>

Sourceยง

impl<'q> Encode<'q, Postgres> for Cow<'_, [u8]>

Sourceยง

impl<'q> Encode<'q, Postgres> for Cow<'_, str>

Sourceยง

impl<'q> Encode<'q, Postgres> for Rc<[u8]>

Sourceยง

impl<'q> Encode<'q, Postgres> for Rc<str>

Sourceยง

impl<'q> Encode<'q, Postgres> for String

Sourceยง

impl<Tz> Encode<'_, Postgres> for DateTime<Tz>
where Tz: TimeZone,

Sourceยง

impl<Tz> Encode<'_, Sqlite> for DateTime<Tz>
where Tz: TimeZone, <Tz as TimeZone>::Offset: Display,

Sourceยง

impl<const N: usize> Encode<'_, Postgres> for [u8; N]

Implementorsยง

Sourceยง

impl Encode<'_, MySql> for MySqlTime

Sourceยง

impl Encode<'_, Postgres> for Oid

Sourceยง

impl Encode<'_, Postgres> for PgBox

Sourceยง

impl Encode<'_, Postgres> for PgCiText

Sourceยง

impl Encode<'_, Postgres> for PgCircle

Sourceยง

impl Encode<'_, Postgres> for PgCube

Sourceยง

impl Encode<'_, Postgres> for PgHstore

Sourceยง

impl Encode<'_, Postgres> for PgInterval

Sourceยง

impl Encode<'_, Postgres> for PgLQuery

Sourceยง

impl Encode<'_, Postgres> for PgLSeg

Sourceยง

impl Encode<'_, Postgres> for PgLTree

Sourceยง

impl Encode<'_, Postgres> for PgLine

Sourceยง

impl Encode<'_, Postgres> for PgMoney

Sourceยง

impl Encode<'_, Postgres> for PgPath

Sourceยง

impl Encode<'_, Postgres> for PgPoint

Sourceยง

impl Encode<'_, Postgres> for PgPolygon

Sourceยง

impl Encode<'_, Postgres> for PgTimeTz

Sourceยง

impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>

Sourceยง

impl<'q, DB> Encode<'q, DB> for &'q BStr
where DB: Database, &'q [u8]: Encode<'q, DB>,

Sourceยง

impl<'q, DB> Encode<'q, DB> for &'q RawValue
where Json<&'a &'q RawValue>: for<'a> Encode<'q, DB>, DB: Database,

Sourceยง

impl<'q, DB> Encode<'q, DB> for BString
where DB: Database, Vec<u8>: Encode<'q, DB>,

Sourceยง

impl<'q, DB> Encode<'q, DB> for RawValue
where Json<&'a RawValue>: for<'a> Encode<'q, DB>, DB: Database,

Sourceยง

impl<'q, DB> Encode<'q, DB> for Value
where Json<&'a Value>: for<'a> Encode<'q, DB>, DB: Database,

Sourceยง

impl<'q, T> Encode<'q, Postgres> for PgRange<T>
where T: Encode<'q, Postgres>,

Sourceยง

impl<T> Encode<'_, MySql> for Json<T>
where T: Serialize,

Sourceยง

impl<T> Encode<'_, MySql> for Text<T>
where T: Display,

Sourceยง

impl<T> Encode<'_, Postgres> for Json<T>
where T: Serialize,

Sourceยง

impl<T> Encode<'_, Postgres> for Text<T>
where T: Display,

Sourceยง

impl<T> Encode<'_, Sqlite> for Json<T>
where T: Serialize,

Sourceยง

impl<T> Encode<'_, Sqlite> for Text<T>
where T: Display,