#[non_exhaustive]pub enum RedactError {
InvalidPattern {
pattern: String,
source: Error,
},
InvalidPointerPath {
path: String,
},
ReplacementMatchesPattern {
replacement: String,
},
JsonParse(Error),
}Expand description
Errors produced by the redaction engine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidPattern
A regex pattern string failed to compile.
Fields
§
source: ErrorThe underlying regex compilation error.
InvalidPointerPath
A JSON pointer path is malformed (non-empty but does not start with /).
ReplacementMatchesPattern
The replacement string itself matches one of the configured patterns, which would break the idempotency guarantee.
JsonParse(Error)
The input bytes are not valid JSON.
Trait Implementations§
Source§impl Debug for RedactError
impl Debug for RedactError
Source§impl Display for RedactError
impl Display for RedactError
Source§impl Error for RedactError
impl Error for RedactError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RedactError
impl !RefUnwindSafe for RedactError
impl Send for RedactError
impl Sync for RedactError
impl Unpin for RedactError
impl UnsafeUnpin for RedactError
impl !UnwindSafe for RedactError
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