Cargo Features

uom = { version = "0.35.0", default-features = false, features = ["std", "autoconvert", "u128", "i128", "biguint", "rational64", "bigrational", "complex64", "f64", "si", "try-from", "use_serde", "rational-support", "bigint-support", "complex-support"] }
default = autoconvert, f32, f64, si, std

These default features are set whenever uom is added without default-features = false somewhere in the dependency tree.

std default

Enables std of num-traits

autoconvert default

Affects si::marker.impl_from

usize u8 u16 u32 u64 u128 = rational-support
isize i8 i16 i32 i64 i128 = rational-support
bigint biguint = bigint-support
rational rational32 rational64 = rational-support
bigrational = bigint-support
complex32 complex64 = complex-support
f32 f64 default
si default

Affects uom::si


The try-from feature is deprecated and will be removed in a future release of uom. Functionality previously exposed by the feature is now enabled by default.

use_serde = serde

The use_serde feature exists so that, in the future, other dependency features like num/serde can be added. However, num/serde is currently left out because it has not yet been updated to Serde 1.0. It is also necessary to name the feature something other than serde because of a cargo bug:

rational-support i128? i16? i32? i64? i8? isize? rational? rational32? rational64? u128? u16? u32? u64? u8? usize? = num-rational

Internal features to include appropriate num-* crates.

Affects uom::num.Rational, uom::num.rational

bigint-support bigint? bigrational? biguint? = num-bigint

Enables num-bigint-std of num-rational

Affects uom::num.rational

complex-support complex32? complex64? = num-complex

Affects uom::num.complex

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

num-rational rational-support?
num-bigint bigint-support?

With std

num-complex complex-support?

With std

serde use_serde?