Cargo Features
arbitrary-int has no features set by default.
[dependencies]
arbitrary-int = { version = "1.3.0", features = ["std", "const_convert_and_const_trait_impl", "step_trait", "defmt", "serde", "borsh", "schemars", "hint", "num-traits"] }
- std schemars?
- const_convert_and_const_trait_impl
-
Supports const trait implementation through const_convert and const_trait_impl. Support for those was removed from more recent Rust nightlies, so this feature requires an older Rust compiler (2023-04-20 is broken, 2022-11-23 works. The exact day is somewhere inbetween).
As of 12/2/2024, this also uses inline_const. This has been stabilized but is required for current code to work on the old compiler. - step_trait
-
core::fmt::Step is currently unstable and is available on nightly behind a feature gate
- defmt
-
Supports defmt
Enables defmt
- serde
-
Supports serde
Enables serde
- borsh
-
Enables borsh
- schemars = std
-
Enables schemars
- hint
-
Provide a soundness promise to the compiler that the underlying value is always within range. This optimizes e.g. indexing range checks when passed in an API. The downside of this feature is that it involves an unsafe call to
core::hint::assert_unchecked
duringvalue()
.
Features from optional dependencies
- num-traits implicit feature
-
Enables num-traits
num-traits:
Numeric traits for generic mathematics