pub trait NativeDecimalType:
Send
+ Sync
+ Clone
+ Copy
+ Debug
+ Display
+ Default
+ RefUnwindSafe
+ Eq
+ Ord
+ BigCast
+ 'static {
const DECIMAL_TYPE: DecimalType;
const MAX_PRECISION: u8;
const MAX_SCALE: i8;
const MIN_BY_PRECISION: &'static [Self];
const MAX_BY_PRECISION: &'static [Self];
// Required methods
fn downcast<V: DecimalTypeDowncast>(visitor: V) -> V::Output<Self>;
fn upcast<V: DecimalTypeUpcast>(input: V::Input<Self>) -> V;
}Expand description
Type of decimal scalar values.
This trait is implemented by native integer types that can be used to store decimal values.
Required Associated Constants§
Sourceconst DECIMAL_TYPE: DecimalType
const DECIMAL_TYPE: DecimalType
The decimal value type corresponding to this native type.
Sourceconst MAX_PRECISION: u8
const MAX_PRECISION: u8
The maximum precision supported by this decimal type.
Sourceconst MIN_BY_PRECISION: &'static [Self]
const MIN_BY_PRECISION: &'static [Self]
The minimum value for each precision supported by this decimal type.
This is an array of length MAX_PRECISION + 1 where the ith element is the minimum value
for a precision of i (including precision 0).
Sourceconst MAX_BY_PRECISION: &'static [Self]
const MAX_BY_PRECISION: &'static [Self]
The maximum value for each precision supported by this decimal type.
similar to MIN_BY_PRECISION.
Required Methods§
Sourcefn downcast<V: DecimalTypeDowncast>(visitor: V) -> V::Output<Self>
fn downcast<V: DecimalTypeDowncast>(visitor: V) -> V::Output<Self>
Downcast the provided object to a type-specific instance.
Sourcefn upcast<V: DecimalTypeUpcast>(input: V::Input<Self>) -> V
fn upcast<V: DecimalTypeUpcast>(input: V::Input<Self>) -> V
Upcast a type-specific instance to a generic instance.
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.