pub trait FromSqlRef<'a, A, DB: Backend>: Sized {
// Required method
fn from_sql(bytes: DB::RawValue<'a>) -> 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", so this trait is not object safe.
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: MysqlValue<'a>) -> Result<Self>
fn from_sql(bytes: MysqlValue<'a>) -> 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: SqliteValue<'a, 'a, 'a>) -> Result<Self>
fn from_sql(value: SqliteValue<'a, 'a, 'a>) -> 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: MysqlValue<'a>) -> Result<Self>
fn from_sql(bytes: MysqlValue<'a>) -> 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: SqliteValue<'a, 'a, 'a>) -> Result<Self>
fn from_sql(value: SqliteValue<'a, 'a, 'a>) -> Result<Self>
Available on crate feature
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.