1#![warn(
24 anonymous_parameters,
25 bare_trait_objects,
26 elided_lifetimes_in_paths,
27 missing_copy_implementations,
28 rust_2018_idioms,
29 trivial_casts,
30 trivial_numeric_casts,
31 unreachable_pub,
32 unsafe_code,
33 unused_extern_crates,
34 unused_import_braces
35)]
36#![warn(
38 clippy::all,
39 clippy::cargo,
40 clippy::dbg_macro,
41 clippy::float_cmp_const,
42 clippy::get_unwrap,
43 clippy::mem_forget,
44 clippy::nursery,
45 clippy::pedantic,
46 clippy::todo,
47 clippy::unwrap_used,
48 clippy::uninlined_format_args
49)]
50#![allow(
52 clippy::cargo_common_metadata,
53 clippy::missing_const_for_fn,
54 clippy::missing_errors_doc,
55 clippy::module_name_repetitions,
56 clippy::must_use_candidate,
57 clippy::use_self
58)]
59#![cfg_attr(test, allow(clippy::non_ascii_literal, clippy::unwrap_used))]
61
62pub use redactable_derive::{NotSensitive, NotSensitiveDisplay, Sensitive, SensitiveDisplay};
63
64#[allow(unused_extern_crates)]
65extern crate self as redactable;
66
67#[cfg(feature = "policy")]
69pub mod policy;
70#[cfg(feature = "redaction")]
71mod redaction;
72#[cfg(feature = "slog")]
73pub mod slog;
74#[cfg(feature = "tracing")]
75pub mod tracing;
76
77#[cfg(feature = "policy")]
79pub use policy::{
80 BlockchainAddress, CreditCard, Email, EmailConfig, IpAddress, KeepConfig, MASK_CHAR,
81 MaskConfig, PhoneNumber, Pii, REDACTED_PLACEHOLDER, RedactionPolicy, Secret,
82 TextRedactionPolicy, Token,
83};
84#[cfg(feature = "redaction")]
86pub use redaction::{
87 NotSensitive, NotSensitiveDebug, NotSensitiveDebugExt, NotSensitiveDisplay,
88 NotSensitiveDisplayExt, NotSensitiveExt, NotSensitiveValue, Redactable, RedactedOutput,
89 RedactedOutputExt, RedactedOutputRef, SensitiveValue, SensitiveWithPolicy, ToRedactedOutput,
90};
91#[cfg(feature = "json")]
92pub use redaction::{
93 NotSensitiveJson, NotSensitiveJsonExt, RedactedJson, RedactedJsonExt, RedactedJsonRef,
94};
95#[doc(hidden)]
97#[cfg(feature = "redaction")]
98pub use redaction::PolicyRedactedFormatterRef;
99#[doc(hidden)]
100#[cfg(feature = "redaction")]
101pub use redaction::{
102 PolicyApplicable, PolicyApplicableRef, RedactableMapper, RedactableWithFormatter,
103 RedactableWithMapper, RedactedFormatterRef, ScalarRedaction, apply_policy, apply_policy_ref,
104 redact,
105};
106#[cfg(feature = "slog")]
107pub use slog::{RedactedDisplayValue, SlogRedactedDisplayExt, SlogRedactedExt};