1#[cfg(feature = "alloc")]
14mod alloc;
15mod core;
16mod default;
17mod escape;
18mod humansize;
19mod indent;
20#[cfg(feature = "serde_json")]
21mod json;
22#[cfg(feature = "std")]
23mod std;
24#[cfg(feature = "urlencode")]
25mod urlencode;
26
27#[cfg(feature = "alloc")]
28pub use self::alloc::{
29 capitalize, fmt, format, lower, lowercase, title, titlecase, trim, upper, uppercase,
30};
31pub use self::core::{
32 Either, PluralizeCount, center, join, linebreaks, linebreaksbr, paragraphbreaks, pluralize,
33 reject, reject_with, truncate, wordcount,
34};
35pub use self::default::{DefaultFilterable, assigned_or};
36pub use self::escape::{
37 AutoEscape, AutoEscaper, Escaper, Html, HtmlSafe, HtmlSafeOutput, MaybeSafe, Safe, Text,
38 Unsafe, Writable, WriteWritable, e, escape, safe,
39};
40pub use self::humansize::filesizeformat;
41pub use self::indent::{AsIndent, indent};
42#[cfg(feature = "serde_json")]
43pub use self::json::{json, json_pretty};
44#[cfg(feature = "std")]
45pub use self::std::unique;
46#[cfg(feature = "urlencode")]
47pub use self::urlencode::{urlencode, urlencode_strict};
48
49const MAX_LEN: usize = 10_000;
51
52#[doc(hidden)]
55#[diagnostic::on_unimplemented(
56 message = "Argument at position {IDX} is invalid on filter {Self}. Too many arguments supplied?",
57 label = "Filter function"
58)]
59pub trait ValidArgIdx<const IDX: usize> {
60 const VALID: bool = true;
61}
62
63#[doc(hidden)]
66#[diagnostic::on_unimplemented(
67 message = "Invalid filter function invocation. Not all required arguments were supplied.",
68 label = "Filter function"
69)]
70pub trait ValidFilterInvocation: Sized {
71 #[inline(always)]
72 fn wrap(self) -> Self {
73 self
74 }
75}