#[non_exhaustive]pub enum ErrorPrivacyPolicy {
Redacted,
Detailed,
}Expand description
Controls whether JSON decoding errors retain input-derived serde details.
Redacted diagnostics are safe by default. Detailed diagnostics are intended only for controlled environments because they may contain input values.
§Examples
ⓘ
#![deny(unused_must_use)]
use qubit_json::ErrorPrivacyPolicy;
fn configured_policy() -> ErrorPrivacyPolicy {
ErrorPrivacyPolicy::Redacted
}
configured_policy();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.
Redacted
Removes input-derived serde messages and sources from decoding errors.
Detailed
Retains complete serde messages and sources for diagnostic use.
Trait Implementations§
Source§impl Clone for ErrorPrivacyPolicy
impl Clone for ErrorPrivacyPolicy
Source§fn clone(&self) -> ErrorPrivacyPolicy
fn clone(&self) -> ErrorPrivacyPolicy
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 ErrorPrivacyPolicy
Source§impl Debug for ErrorPrivacyPolicy
impl Debug for ErrorPrivacyPolicy
Source§impl Default for ErrorPrivacyPolicy
impl Default for ErrorPrivacyPolicy
Source§fn default() -> ErrorPrivacyPolicy
fn default() -> ErrorPrivacyPolicy
Returns the “default value” for a type. Read more
impl Eq for ErrorPrivacyPolicy
Source§impl PartialEq for ErrorPrivacyPolicy
impl PartialEq for ErrorPrivacyPolicy
impl StructuralPartialEq for ErrorPrivacyPolicy
Auto Trait Implementations§
impl Freeze for ErrorPrivacyPolicy
impl RefUnwindSafe for ErrorPrivacyPolicy
impl Send for ErrorPrivacyPolicy
impl Sync for ErrorPrivacyPolicy
impl Unpin for ErrorPrivacyPolicy
impl UnsafeUnpin for ErrorPrivacyPolicy
impl UnwindSafe for ErrorPrivacyPolicy
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