pub struct PiiAttachmentsProcessor<'a> { /* private fields */ }
Expand description
A PII processor for attachment files.
Implementations§
source§impl<'a> PiiAttachmentsProcessor<'a>
impl<'a> PiiAttachmentsProcessor<'a>
sourcepub fn new(compiled_config: &'a CompiledPiiConfig) -> Self
pub fn new(compiled_config: &'a CompiledPiiConfig) -> Self
Creates a new PiiAttachmentsProcessor
from the given PII config.
sourcepub fn scrub_attachment(&self, filename: &str, data: &mut [u8]) -> bool
pub fn scrub_attachment(&self, filename: &str, data: &mut [u8]) -> bool
Applies PII scrubbing rules to a plain attachment.
Returns true
, if the attachment was modified.
sourcepub fn scrub_utf8_filepath(
&self,
path: &mut str,
state: &ProcessingState<'_>,
) -> bool
pub fn scrub_utf8_filepath( &self, path: &mut str, state: &ProcessingState<'_>, ) -> bool
Scrub a filepath, preserving the basename.
sourcepub fn scrub_utf16_filepath(
&self,
path: &mut WStr<LittleEndian>,
state: &ProcessingState<'_>,
) -> bool
pub fn scrub_utf16_filepath( &self, path: &mut WStr<LittleEndian>, state: &ProcessingState<'_>, ) -> bool
Scrub a filepath, preserving the basename.
source§impl PiiAttachmentsProcessor<'_>
impl PiiAttachmentsProcessor<'_>
sourcepub fn scrub_minidump(
&self,
filename: &str,
data: &mut [u8],
) -> Result<bool, ScrubMinidumpError>
pub fn scrub_minidump( &self, filename: &str, data: &mut [u8], ) -> Result<bool, ScrubMinidumpError>
Applies PII rules to the given minidump.
This function selectively opens minidump streams in order to avoid destroying the stack memory required for minidump processing. It visits:
- All stack memory regions with
ValueType::StackMemory
- All other memory regions with
ValueType::HeapMemory
- Linux auxiliary streams with
ValueType::Binary
Returns true
, if the minidump was modified.
Auto Trait Implementations§
impl<'a> Freeze for PiiAttachmentsProcessor<'a>
impl<'a> RefUnwindSafe for PiiAttachmentsProcessor<'a>
impl<'a> Send for PiiAttachmentsProcessor<'a>
impl<'a> Sync for PiiAttachmentsProcessor<'a>
impl<'a> Unpin for PiiAttachmentsProcessor<'a>
impl<'a> UnwindSafe for PiiAttachmentsProcessor<'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