pub trait RedactableWithPolicy<P>: Sized {
// Required methods
fn redact_with_policy(self, policy: &TextRedactionPolicy) -> Self;
fn redacted_string(&self, policy: &TextRedactionPolicy) -> String;
}Expand description
A policy-aware leaf that can be redacted without requiring a local newtype.
This is the external-type escape hatch: you can implement it for a foreign type
using a local policy P, even when you cannot implement RedactableLeaf due to
orphan rules.
Required Methods§
Sourcefn redact_with_policy(self, policy: &TextRedactionPolicy) -> Self
fn redact_with_policy(self, policy: &TextRedactionPolicy) -> Self
Returns a redacted version of self using the provided policy.
Sourcefn redacted_string(&self, policy: &TextRedactionPolicy) -> String
fn redacted_string(&self, policy: &TextRedactionPolicy) -> String
Returns a redacted string representation using the provided policy.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.