Cargo Features

[dependencies]
rust_decimal_ext = { version = "1.36.1", default-features = false, features = ["borsh", "c-repr", "db-diesel-mysql", "db-diesel-postgres", "db-diesel2-mysql", "db-diesel2-postgres", "db-postgres", "db-tokio-postgres", "legacy-ops", "maths", "maths-nopanic", "ndarray", "rand", "rkyv", "rkyv-safe", "rocket-traits", "rust-fuzz", "serde", "serde-arbitrary-precision", "proptest", "serde-bincode", "std", "serde-float", "serde-str", "serde-with-arbitrary-precision", "serde-with-float", "serde-with-str", "tokio-pg", "tokio-postgres"] }
default = serde, std

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

borsh = std

Enables borsh

c-repr

Force Decimal to be repr(C)

db-diesel-mysql db-diesel2-mysql? = std

Enables mysql of diesel

db-diesel-postgres db-diesel2-postgres? = std

Enables postgres of diesel

db-diesel2-mysql = db-diesel-mysql
db-diesel2-postgres = db-diesel-postgres
db-postgres = std

Enables bytes and postgres-types

db-tokio-postgres tokio-pg? = std

Enables bytes and postgres-types

legacy-ops
maths maths-nopanic?
maths-nopanic = maths
ndarray

Enables ndarray ^0.15.6

rand

Enables rand

rkyv rkyv-safe?

Enables rkyv ^0.7.42

rkyv-safe

Enables validation of rkyv ^0.7.42

rocket-traits = std

Enables rocket

rust-fuzz

Enables arbitrary

serde default serde-with-arbitrary-precision? serde-with-float? serde-with-str?

Enables serde

Affects rust_decimal_ext::serde

serde-arbitrary-precision = serde-with-arbitrary-precision
proptest

Enables proptest

serde-bincode = serde-str

Backwards compatability

std default borsh? db-diesel-mysql? db-diesel-postgres? db-postgres? db-tokio-postgres? rocket-traits?

Enables optional rkyv ^0.7.42, std of optional serde and optional serde_json and std of arrayvec, optional borsh, optional bytes, and optional rand

rand:

Option (enabled by default): without "std" rand uses libcore; this option enables functionality expected to be available on a standard platform.

serde-float = serde-with-float
serde-str serde-bincode? = serde-with-str
serde-with-arbitrary-precision serde-arbitrary-precision? = serde

Enables arbitrary_precision and std of serde_json

Affects serde::arbitrary_precision, serde::arbitrary_precision_option, serde::DecimalFromString, rust_decimal_ext::serde

serde-with-float serde-float? = serde

Affects serde::float, serde::float_option, rust_decimal_ext::serde

serde-with-str serde-str? = serde

Affects serde::str, serde::str_option, rust_decimal_ext::serde

tokio-pg = db-tokio-postgres

Backwards compatability

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

diesel db-diesel-mysql? db-diesel-postgres?
serde_json serde-with-arbitrary-precision?
tokio-postgres implicit feature

Enables tokio-postgres

tokio-postgres:

A native, asynchronous PostgreSQL client