pub trait FromSqlRef<'a, A, DB: Backend>: Sized {
// Required method
fn from_sql(bytes: &'a mut DB::RawValue<'_>) -> Result<Self>;
}Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Expand description
A helper trait for deserializing data in a borrowed variant
This is mostly useful for getting a &str or &[u8] in your code
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a> FromSqlRef<'a, Binary, Mysql> for &'a [u8]
Available on crate feature mysql_backend only.
impl<'a> FromSqlRef<'a, Binary, Mysql> for &'a [u8]
Available on crate feature
mysql_backend only.Source§fn from_sql(bytes: &'a mut MysqlValue<'_>) -> Result<Self>
fn from_sql(bytes: &'a mut MysqlValue<'_>) -> Result<Self>
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Source§impl<'a> FromSqlRef<'a, Binary, Pg> for &'a [u8]
Available on crate feature postgres_backend only.
impl<'a> FromSqlRef<'a, Binary, Pg> for &'a [u8]
Available on crate feature
postgres_backend only.Source§impl<'a> FromSqlRef<'a, Binary, Sqlite> for &'a [u8]
Available on crate feature __sqlite-shared only.
impl<'a> FromSqlRef<'a, Binary, Sqlite> for &'a [u8]
Available on crate feature
__sqlite-shared only.Source§fn from_sql(value: &'a mut SqliteValue<'_, '_, '_>) -> Result<Self>
fn from_sql(value: &'a mut SqliteValue<'_, '_, '_>) -> Result<Self>
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Source§impl<'a> FromSqlRef<'a, Text, Mysql> for &'a str
Available on crate feature mysql_backend only.
impl<'a> FromSqlRef<'a, Text, Mysql> for &'a str
Available on crate feature
mysql_backend only.Source§fn from_sql(bytes: &'a mut MysqlValue<'_>) -> Result<Self>
fn from_sql(bytes: &'a mut MysqlValue<'_>) -> Result<Self>
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Source§impl<'a> FromSqlRef<'a, Text, Pg> for &'a str
Available on crate feature postgres_backend only.
impl<'a> FromSqlRef<'a, Text, Pg> for &'a str
Available on crate feature
postgres_backend only.Source§impl<'a> FromSqlRef<'a, Text, Sqlite> for &'a str
Available on crate feature __sqlite-shared only.
impl<'a> FromSqlRef<'a, Text, Sqlite> for &'a str
Available on crate feature
__sqlite-shared only.Source§fn from_sql(value: &'a mut SqliteValue<'_, '_, '_>) -> Result<Self>
fn from_sql(value: &'a mut SqliteValue<'_, '_, '_>) -> Result<Self>
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.