pub struct SensitiveInfoConfig {
redact_sensitive_info: bool,
}
Expand description
The SensitiveInfoConfig
type is used to configure how we handle
sensitive information (cryptographic keys, passwords, etc.) when using
Display
and Debug
.
Fields§
§redact_sensitive_info: bool
A boolean indicating whether sensitive information should be redacted. If set to true, the sensitive information will be redacted (hidden or masked). If set to false, the sensitive information will not be redacted.
Implementations§
source§impl SensitiveInfoConfig
impl SensitiveInfoConfig
sourceconst REDACTED_INFO_LABEL: &'static str = "***REDACTED***"
const REDACTED_INFO_LABEL: &'static str = "***REDACTED***"
Tis is the label used to redact sensitive information in the library output
sourcepub fn new(redact_sensitive_info: bool) -> Self
pub fn new(redact_sensitive_info: bool) -> Self
Constructor for SensitiveInfoConfig
type.
The default is to redact sensitive information in the output.
Constructs a new instance of the type SensitiveInfoConfig
§Arguments
redact_sensitive_info
- A boolean indicating whether to redact sensitive information. - When set to true, any sensitive information handled by instances using this configuration will be redacted (hidden or masked). - When set to false, the sensitive information will not be redacted.
§Returns
- Returns a new instance of
SensitiveInfoConfig
, initialized with the providedredact_sensitive_info
flag.
§Example
use lock_keeper::infrastructure::sensitive_info::SensitiveInfoConfig;
let redact_sensitive_info = true;
let config = SensitiveInfoConfig::new(redact_sensitive_info);
sourcepub fn redacted_label(self) -> String
pub fn redacted_label(self) -> String
Returns a label that is used in place of sensitive information.
sourcepub fn is_redacted(&self) -> bool
pub fn is_redacted(&self) -> bool
Returns the status of the sensitive information redaction.
Trait Implementations§
source§impl Clone for SensitiveInfoConfig
impl Clone for SensitiveInfoConfig
source§fn clone(&self) -> SensitiveInfoConfig
fn clone(&self) -> SensitiveInfoConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for SensitiveInfoConfig
impl<'de> Deserialize<'de> for SensitiveInfoConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Drop for SensitiveInfoConfig
impl Drop for SensitiveInfoConfig
source§impl PartialEq for SensitiveInfoConfig
impl PartialEq for SensitiveInfoConfig
source§fn eq(&self, other: &SensitiveInfoConfig) -> bool
fn eq(&self, other: &SensitiveInfoConfig) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SensitiveInfoConfig
impl Serialize for SensitiveInfoConfig
source§impl TryFrom<SensitiveInfoConfig> for Vec<u8>
impl TryFrom<SensitiveInfoConfig> for Vec<u8>
Conversion from SensitiveInfoConfig
to Vec<u8>
source§impl TryFrom<Vec<u8>> for SensitiveInfoConfig
impl TryFrom<Vec<u8>> for SensitiveInfoConfig
Conversion from Vec<u8>
to SensitiveInfoConfig
source§impl Zeroize for SensitiveInfoConfig
impl Zeroize for SensitiveInfoConfig
impl Eq for SensitiveInfoConfig
impl StructuralPartialEq for SensitiveInfoConfig
Auto Trait Implementations§
impl Freeze for SensitiveInfoConfig
impl RefUnwindSafe for SensitiveInfoConfig
impl Send for SensitiveInfoConfig
impl Sync for SensitiveInfoConfig
impl Unpin for SensitiveInfoConfig
impl UnwindSafe for SensitiveInfoConfig
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
source§impl<T> ConvertMessage for Twhere
T: for<'a> Deserialize<'a> + Serialize,
impl<T> ConvertMessage for Twhere
T: for<'a> Deserialize<'a> + Serialize,
fn from_message(value: Message) -> Result<Self, LockKeeperError>
fn to_message(self) -> Result<Message, LockKeeperError>
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request