Trait multiversx_sc_snippets::imports::Decimals
source · 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.
Object Safety§
This trait is not object safe.