pub trait Backendwhere
Self: Sized + HasSqlType<SmallInt> + HasSqlType<Integer> + HasSqlType<BigInt> + HasSqlType<Float> + HasSqlType<Double> + HasSqlType<VarChar> + HasSqlType<Text> + HasSqlType<Binary> + HasSqlType<Date> + HasSqlType<Time> + HasSqlType<Timestamp>,{
type QueryBuilder: QueryBuilder<Self>;
type BindCollector: BindCollector<Self>;
type RawValue: ?Sized;
type ByteOrder: ByteOrder;
}
Expand description
A database backend
This trait represents the concept of a backend (e.g. “MySQL” vs “SQLite”).
It is separate from a Connection
to that backend.
One backend may have multiple concrete connection implementations.
Implementations of this trait should not assume details about how the
connection is implemented.
For example, the Pg
backend does not assume that libpq
is being used.
Implementations of this trait can and should care about details of the wire
protocol used to communicated with the database.
Required Associated Types§
Sourcetype QueryBuilder: QueryBuilder<Self>
type QueryBuilder: QueryBuilder<Self>
The concrete QueryBuilder
implementation for this backend.
Sourcetype BindCollector: BindCollector<Self>
type BindCollector: BindCollector<Self>
The concrete BindCollector
implementation for this backend.
Most backends should use RawBytesBindCollector
.
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.