pub enum RedactedValue<'a> {
Text(RedactedText<'a>),
Some(RedactedText<'a>),
None,
}Expand description
Redacted text retaining its original plain or optional container shape.
§Type Parameters
'a- Lifetime of any borrowed redacted text stored by the value.
Variants§
Text(RedactedText<'a>)
A plain textual value.
Tuple Fields
§
0: RedactedText<'a>Masked text, borrowed when the masking policy permits it.
Some(RedactedText<'a>)
A present optional textual value.
Tuple Fields
§
0: RedactedText<'a>Masked contents of the present option.
None
An absent optional textual value.
Implementations§
Source§impl<'a> RedactedValue<'a>
impl<'a> RedactedValue<'a>
Sourcepub fn opaque(level: Sensitivity, masking: &MaskingPolicy) -> Self
pub fn opaque(level: Sensitivity, masking: &MaskingPolicy) -> Self
Trait Implementations§
Source§impl<'a> Clone for RedactedValue<'a>
impl<'a> Clone for RedactedValue<'a>
Source§fn clone(&self) -> RedactedValue<'a>
fn clone(&self) -> RedactedValue<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedactedValue<'_>
impl Debug for RedactedValue<'_>
Source§fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
Writes the masked text while retaining normal text and option shapes.
§Parameters
formatter- Destination formatting context.
§Returns
The formatter result for the complete redacted value.
§Errors
Returns fmt::Error when the destination cannot accept the complete
representation.
Source§impl Display for RedactedValue<'_>
impl Display for RedactedValue<'_>
Source§fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
Writes masked contents escaped for a plain-text log boundary.
§Parameters
formatter- Destination formatting context.
§Returns
The formatter result for the complete log-safe value.
§Errors
Returns fmt::Error when the destination cannot accept the complete
log-safe representation.
impl<'a> Eq for RedactedValue<'a>
Source§impl<'a> PartialEq for RedactedValue<'a>
impl<'a> PartialEq for RedactedValue<'a>
Source§impl Serialize for RedactedValue<'_>
Available on crate feature serde only.
impl Serialize for RedactedValue<'_>
Available on crate feature
serde only.impl<'a> StructuralPartialEq for RedactedValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for RedactedValue<'a>
impl<'a> RefUnwindSafe for RedactedValue<'a>
impl<'a> Send for RedactedValue<'a>
impl<'a> Sync for RedactedValue<'a>
impl<'a> Unpin for RedactedValue<'a>
impl<'a> UnsafeUnpin for RedactedValue<'a>
impl<'a> UnwindSafe for RedactedValue<'a>
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