pub trait ArithmeticOutput<Rhs: Numeric = Self, Op = ArithmeticOp>: Numeric {
type Output: Numeric;
type Nullability: ArithmeticNullability;
}Expand description
Maps a pair of numeric SQL types and an operator to the result SQL type.
The output follows SQL’s type promotion rules: narrower types widen to
wider types (e.g. Int2 + Int8 → Int8, Int4 + Float8 → Float8).
Dialects whose output varies by operator, such as MySQL integer division,
implement only the corresponding operator marker.
Required Associated Types§
Sourcetype Nullability: ArithmeticNullability
type Nullability: ArithmeticNullability
Whether the operator itself can introduce NULL.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".