1//! Module for built-in filter functions
2//!
3//! Contains all the built-in filter functions for use in templates.
4//! You can define your own filters, as well.
5//!
6//! ## Note
7//!
8//! All **result types of any filter function** in this module is **subject to change** at any
9//! point, and is **not indicated by as semver breaking** version bump.
10//! The traits [`AutoEscape`] and [`WriteWritable`] are used by [`rinja_derive`]'s generated code
11//! to work with all compatible types.
12
13mod builtin;
14mod escape;
15#[cfg(feature = "humansize")]
16mod humansize;
17#[cfg(feature = "serde_json")]
18mod json;
19#[cfg(feature = "urlencode")]
20mod urlencode;
21
22pub use self::builtin::{
23 PluralizeCount, capitalize, center, fmt, format, indent, join, linebreaks, linebreaksbr, lower,
24 lowercase, paragraphbreaks, pluralize, title, trim, truncate, upper, uppercase, wordcount,
25};
26pub use self::escape::{
27 AutoEscape, AutoEscaper, Escaper, FastWritable, Html, HtmlSafe, HtmlSafeOutput, MaybeSafe,
28 Safe, Text, Unsafe, Writable, WriteWritable, e, escape, safe,
29};
30#[cfg(feature = "humansize")]
31pub use self::humansize::filesizeformat;
32#[cfg(feature = "serde_json")]
33pub use self::json::{AsIndent, json, json_pretty};
34#[cfg(feature = "urlencode")]
35pub use self::urlencode::{urlencode, urlencode_strict};
36