Trait ToSql
pub trait ToSql {
// Required method
fn to_sql(&self) -> Result<ToSqlOutput<'_>, Error>;
}Expand description
A trait for types that can be converted into SQLite values. Returns
crate::Error::ToSqlConversionFailure if the conversion fails.
Required Methods§
fn to_sql(&self) -> Result<ToSqlOutput<'_>, Error>
fn to_sql(&self) -> Result<ToSqlOutput<'_>, Error>
Converts Rust value to SQLite value
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl ToSql for Audience
impl ToSql for CircleId
impl ToSql for CloudProvider
impl ToSql for DeviceId
A device id as its eight big-endian bytes, as coven_devices holds it:
the whole 64-bit id, which an SQL integer would hold only as a signed
number.
impl ToSql for DeviceState
impl ToSql for FileId
A file id as canonical UUID text, as coven_files and the app’s file
columns hold it.
impl ToSql for KeyId
A store or circle key’s id as its sixteen bytes, as coven’s key columns hold it.
impl ToSql for MemberId
A member id as canonical UUID text, as coven’s member columns and the
coven_members view hold it.
impl ToSql for MemberRole
impl ToSql for MoveId
A move id bound and read as an SQL integer, as coven_uploads.move
and coven_pending.move hold it for the app’s cancel_move (E4).
impl ToSql for Null
impl ToSql for ObjectId
A stored object’s id as its sixteen bytes, as coven’s object columns hold it.
impl ToSql for SqlFnArg
impl ToSql for StoreId
A store id as its sixteen bytes, as _coven_store holds it.