pub struct Obfuscator { /* private fields */ }Expand description
Obfuscation configuration for the WAF.
This is effectively a pair of regular expressions that are respectively used to determine which key and value data to obfuscate when producing WAF outputs.
Implementations§
Source§impl Obfuscator
impl Obfuscator
Sourcepub fn new<T: Into<Vec<u8>>, U: Into<Vec<u8>>>(
key_regex: Option<T>,
value_regex: Option<U>,
) -> Self
pub fn new<T: Into<Vec<u8>>, U: Into<Vec<u8>>>( key_regex: Option<T>, value_regex: Option<U>, ) -> Self
Creates a new Obfuscator with the provided key and value regular
expressions.
§Panics
Panics if the provided key or value cannot be turned into a [CString].
Sourcepub fn key_regex(&self) -> Option<&[u8]>
pub fn key_regex(&self) -> Option<&[u8]>
Returns the regular expression used to determine key data to be obfuscated, if one has been set.
Sourcepub fn value_regex(&self) -> Option<&[u8]>
pub fn value_regex(&self) -> Option<&[u8]>
Returns the regular expression used to determine value data to be obfuscated, if one has been set.
Trait Implementations§
Source§impl Clone for Obfuscator
impl Clone for Obfuscator
Source§fn clone(&self) -> Obfuscator
fn clone(&self) -> Obfuscator
Returns a duplicate of the value. Read more
1.0.0 · 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 Obfuscator
impl Debug for Obfuscator
Auto Trait Implementations§
impl Freeze for Obfuscator
impl RefUnwindSafe for Obfuscator
impl Send for Obfuscator
impl Sync for Obfuscator
impl Unpin for Obfuscator
impl UnwindSafe for Obfuscator
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