FixedOptionalNum

Trait FixedOptionalNum 

Source
pub trait FixedOptionalNum: Sealed { }
Expand description

This trait is used to provide supertraits to the Fixed trait depending on the crate’s optional features, and should not be used directly.

If the num-traits experimental feature is enabled, the following are supertraits of Fixed:

  • [Zero]
  • [Bounded]
  • [Inv]
  • [CheckedAdd], [CheckedSub], [CheckedNeg], [CheckedMul], [CheckedDiv], [CheckedRem], [CheckedShl], [CheckedShr]
  • [SaturatingAdd], [SaturatingSub], [SaturatingMul]
  • [WrappingAdd], [WrappingSub], [WrappingNeg], [WrappingMul], [WrappingShl], [WrappingShr]
  • [OverflowingAdd], [OverflowingSub], [OverflowingMul]
  • [ToPrimitive], [FromPrimitive]
  • [FloatConst]

The following are not supertraits of Fixed, even though they are implemented for fixed-point numbers where applicable:

Similarly, Signed and Unsigned are not supertraits of FixedSigned and FixedUnsigned because they have Num as a supertrait.

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.

Implementors§