pub struct RedactOptions {
pub allow_empty_match: bool,
}Available on crate feature
redaction only.Expand description
Options for configuring redaction behavior.
Use this struct with RedactionBuilder::redact_with_options and
RedactionBuilder::redact_remove_with to customize how redaction
handles edge cases.
§Example
ⓘ
use clawspec_core::RedactOptions;
// Allow empty matches (useful for optional fields)
let options = RedactOptions { allow_empty_match: true };
builder
.redact_with_options("$.optional[*].field", "value", options)?
.finish()
.await;Fields§
§allow_empty_match: boolIf true, matching zero paths is not an error (silent no-op).
By default (false), if a path matches nothing, an error is returned.
This helps catch typos in path expressions. Set to true when redacting
optional fields that may not always be present.
Trait Implementations§
Source§impl Clone for RedactOptions
impl Clone for RedactOptions
Source§fn clone(&self) -> RedactOptions
fn clone(&self) -> RedactOptions
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 RedactOptions
impl Debug for RedactOptions
Source§impl Default for RedactOptions
impl Default for RedactOptions
Source§fn default() -> RedactOptions
fn default() -> RedactOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RedactOptions
impl RefUnwindSafe for RedactOptions
impl Send for RedactOptions
impl Sync for RedactOptions
impl Unpin for RedactOptions
impl UnwindSafe for RedactOptions
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