Cargo Features

[dependencies]
wary = { version = "0.1.0", default-features = false, features = ["std", "alloc", "full", "derive", "email", "url", "regex", "semver", "graphemes", "uuid", "credit_card", "serde"] }
default = derive, std

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

std default email? = alloc

Affects wary::internal.init_regex

alloc std

Enables alloc of optional serde

serde:

Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.

Affects options::transformer.trim

full = credit_card, email, graphemes, regex, semver, url, uuid
derive default

Enables wary_derive

email full? = std

TODO: https://github.com/johnstonskj/rust-email_address/pull/36

Enables email_address

Affects options::rule.email

url full?

Enables url

Affects options::rule.url

regex full?

once_cell is needed when std is disabled

Enables once_cell and regex

Affects wary::internal.init_regex, options::rule.regex, wary::internal.init_regex

semver full?

Enables semver

Affects options::rule.semver

graphemes full?

Enables unicode-segmentation

Affects length::Graphemes, length::GraphemesLength

uuid full?

Enables uuid

Affects options::rule.uuid

credit_card full?

Enables creditcard

Affects options::rule.credit_card

serde

Enables serde