pub struct RowMask { /* private fields */ }Expand description
Masks a row’s values wherever they appear in a text (a rendered path, a plugin’s error).
Implementations§
Source§impl RowMask
impl RowMask
Sourcepub fn new(each: &Map<String, Value>, key: &[String]) -> RowMask
pub fn new(each: &Map<String, Value>, key: &[String]) -> RowMask
The row’s string values worth hiding: every each.* value but the key’s, at least three
characters long (shorter ones would mask parts of unrelated words).
pub fn apply(&self, text: &str) -> String
Sourcepub fn apply_json(&self, v: &Value) -> Value
pub fn apply_json(&self, v: &Value) -> Value
Mask every string in a JSON value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RowMask
impl RefUnwindSafe for RowMask
impl Send for RowMask
impl Sync for RowMask
impl Unpin for RowMask
impl UnsafeUnpin for RowMask
impl UnwindSafe for RowMask
Blanket Implementations§
impl<T> Allocation for T
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