pub trait RoundingPolicy<D>: Numeric {
type Output: DataType;
// Provided methods
fn precision_operand<'a, V: SQLParam + 'a>(expr: SQL<'a, V>) -> SQL<'a, V> { ... }
fn coerce_result<'a, V: SQLParam + 'a>(sql: SQL<'a, V>) -> SQL<'a, V> { ... }
}Required Associated Types§
Provided Methods§
Sourcefn precision_operand<'a, V: SQLParam + 'a>(expr: SQL<'a, V>) -> SQL<'a, V>
fn precision_operand<'a, V: SQLParam + 'a>(expr: SQL<'a, V>) -> SQL<'a, V>
Prepare the operand of ROUND(expr, precision).
PostgreSQL only defines the two-argument ROUND for numeric, and
double precision does not cast to it implicitly.
Sourcefn coerce_result<'a, V: SQLParam + 'a>(sql: SQL<'a, V>) -> SQL<'a, V>
fn coerce_result<'a, V: SQLParam + 'a>(sql: SQL<'a, V>) -> SQL<'a, V>
Coerce a rounding function’s result to Self::Output.
PostgreSQL returns numeric for every rounding function unless the
argument is double precision; the declared output is float8.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".