pub trait ValueSqlType:
SqlType<IsNull = NotNull>
+ SingleValue
+ Sized {
type Rust: AsExpression<Self> + Send + 'static;
const ACCEPTS: &'static [ValueKind];
// Required method
fn rust(value: Value) -> Result<Option<Self::Rust>, Value>;
}Expand description
A non-null SQL type a domain value binds as: the Rust type it binds, taken
from a Value.
Implemented for Diesel’s SQL types queryweave’s values fit, each accepting
the variants it holds without loss (an Integer column takes I32 and
I16; a Timestamp column a NaiveDateTime, or a UTC DateTimeUtc as its
naive UTC time). Implement it for a SQL type of your own (with
Comparison and ColumnValue) to filter and write its columns.
Required Associated Constants§
Required Associated Types§
Sourcetype Rust: AsExpression<Self> + Send + 'static
type Rust: AsExpression<Self> + Send + 'static
The Rust type the value binds as.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".