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 const fn key_regex(&self) -> Option<&CStr>
pub const fn key_regex(&self) -> Option<&CStr>
Returns the regular expression used to determine key data to be obfuscated, if one has been set.
Sourcepub const fn value_regex(&self) -> Option<&CStr>
pub const fn value_regex(&self) -> Option<&CStr>
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§impl Default for Obfuscator
impl Default 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