#[non_exhaustive]pub enum RedactionReason {
InputLimitReached,
OutputLimitReached,
TraversalLimitReached,
DepthLimitReached,
SourceTruncated,
InvalidJson,
InvalidUri,
InvalidContentType,
UnsupportedContentType,
InvalidForm,
InvalidMultipart,
FormattingFailed,
}Expand description
Reason why a policy-transformed representation is degraded.
§Examples
use qubit_redact::{RedactionPolicy, RedactionReason, Redactor};
let policy = RedactionPolicy::builder().limits(|limits| {
limits.max_input_bytes(0);
})?.build()?;
let output = Redactor::new(policy).redact_field("id", "42");
assert!(output.summary().reasons().contains(RedactionReason::InputLimitReached));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.
InputLimitReached
Input admission rejected bytes beyond the configured input allowance.
OutputLimitReached
The shared transaction output reached its configured byte limit.
TraversalLimitReached
Structural traversal reached a configured limit.
DepthLimitReached
Maximum traversal depth was reached.
SourceTruncated
Source data was already truncated at its ingress boundary.
InvalidJson
Source data was not valid JSON.
InvalidUri
Source data was not a valid URI.
InvalidContentType
Source content type was invalid.
UnsupportedContentType
Source content type is unsupported.
InvalidForm
Source data was not a valid URL-encoded form.
InvalidMultipart
Source data was not a valid multipart body.
FormattingFailed
A display formatter failed before producing a complete scalar value.
Trait Implementations§
Source§impl Clone for RedactionReason
impl Clone for RedactionReason
Source§fn clone(&self) -> RedactionReason
fn clone(&self) -> RedactionReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RedactionReason
Source§impl Debug for RedactionReason
impl Debug for RedactionReason
impl Eq for RedactionReason
Source§impl Hash for RedactionReason
impl Hash for RedactionReason
Source§impl PartialEq for RedactionReason
impl PartialEq for RedactionReason
impl StructuralPartialEq for RedactionReason
Auto Trait Implementations§
impl Freeze for RedactionReason
impl RefUnwindSafe for RedactionReason
impl Send for RedactionReason
impl Sync for RedactionReason
impl Unpin for RedactionReason
impl UnsafeUnpin for RedactionReason
impl UnwindSafe for RedactionReason
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