Cargo Features
[dependencies]
tera = { version = "1.20.0", default-features = false, features = ["builtins", "urlencode", "preserve_order", "date-locale"] }
- default = builtins
-
The
builtins
feature is set by default whenevertera
is added without
somewhere in the dependency tree.default-features = false - builtins default date-locale? = chrono, chrono-tz, humansize, rand, slug, urlencode
-
Affects
common::date
,number::filesizeformat
,string::slugify
,functions::now
,functions::get_random
… - urlencode builtins = percent-encoding
-
Affects
string::urlencode
,string::urlencode_strict
… - preserve_order
-
Enables preserve_order of serde_json
serde_json:
Make serde_json::Map use a representation which maintains insertion order.
This allows data to be read into a Value and written back to a JSON string while preserving the order of map keys in the input. - date-locale = builtins
-
Enables unstable-locales of chrono
used in date format filter
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.
- slug builtins
-
Enables slug
used in slugify filter
- percent-encoding urlencode?
-
Enables percent-encoding
used in urlencode filter
- humansize builtins
-
Enables humansize
used in filesizeformat filter
- chrono builtins date-locale?
- chrono-tz builtins
-
Enables chrono-tz ^0.9
used in date format filter
- rand builtins
-
Enables rand
used in get_random function