pub trait RuntimeNum:
Sortable
+ Copy
+ HasCompact<Type: DecodeWithMemTracking>
+ Default
+ CrossEnvType { }Expand description
Deterministic, compact, persistable numeric type for runtime quantities.
Extends Sortable with numeric ergonomics:
Copyfor primitive-like bitwise copy semantics- [
HasCompact] for efficient numeric SCALE encoding by truncating unused bits Defaultfor a canonical zero-like value for instantiationCrossEnvTypeto ensure safe portability acrossno_stdruntime and native (std) environments, enabling optional serialization (e.g.serde) and thread-safe usage in off-chain, RPC, or testing contexts.
These guarantees make the type safe for repeated arithmetic, deterministic ordering, compact persistence, and cross-environment interoperability within runtime logic.
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.