pub struct Redactor { /* private fields */ }Expand description
A validated policy with the key its digest actions need: the only path
by which an exporter turns a record value into an exported one (3.4.7).
Implementations§
Source§impl Redactor
impl Redactor
Sourcepub fn new(
policy: RedactionPolicy,
key: Option<DigestKey>,
) -> Result<Self, RedactorError>
pub fn new( policy: RedactionPolicy, key: Option<DigestKey>, ) -> Result<Self, RedactorError>
Validate policy and refuse a missing key when any effective action
is digest (3.4.5).
pub fn policy(&self) -> &RedactionPolicy
pub fn policy_id(&self) -> &RedactionPolicyId
Sourcepub fn apply(
&self,
field: &str,
class: FieldClass,
value: &TraceValue,
) -> Applied
pub fn apply( &self, field: &str, class: FieldClass, value: &TraceValue, ) -> Applied
Apply the effective action for field holding value of class.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Redactor
impl RefUnwindSafe for Redactor
impl Send for Redactor
impl Sync for Redactor
impl Unpin for Redactor
impl UnsafeUnpin for Redactor
impl UnwindSafe for Redactor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more