pub trait Decimals {
// Required method
fn num_decimals(&self) -> usize;
// Provided method
fn scaling_factor<M>(&self) -> ManagedRef<'static, M, BigUint<M>>
where M: ManagedTypeApi { ... }
}
Expand description
Implemented by all decimal types usable in ManagedDecimal
.
Required Methods§
Sourcefn num_decimals(&self) -> usize
fn num_decimals(&self) -> usize
Number of decimals as variable.
Provided Methods§
Sourcefn scaling_factor<M>(&self) -> ManagedRef<'static, M, BigUint<M>>where
M: ManagedTypeApi,
fn scaling_factor<M>(&self) -> ManagedRef<'static, M, BigUint<M>>where
M: ManagedTypeApi,
10^num_decimals, represented as a BigUint
.
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.