#[non_exhaustive]pub enum DeviationAddError {
DuplicateId(String),
EmptyField(String),
MalformedScope {
kind: String,
reason: String,
},
}Expand description
Error returned by DeviationStore::add.
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.
DuplicateId(String)
A deviation with the same id already exists in the store.
EmptyField(String)
A required string field (justification or authorized_by) was empty.
MalformedScope
The deviation’s DeviationScope is structurally malformed:
the kind is recognized but a required prop is missing or
wrong-typed for that kind. Returned by DeviationStore::add
at insertion time so the operator sees a specific error
instead of a silent never-matches deviation (PKIX-hy2e.9).
kind names the offending scope kind; reason describes the
structural problem (e.g. “missing required prop
‘pkix-lint.issuer-dn-substring’”).
Trait Implementations§
Source§impl Clone for DeviationAddError
impl Clone for DeviationAddError
Source§fn clone(&self) -> DeviationAddError
fn clone(&self) -> DeviationAddError
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 moreSource§impl Debug for DeviationAddError
impl Debug for DeviationAddError
Source§impl Display for DeviationAddError
impl Display for DeviationAddError
impl Eq for DeviationAddError
Source§impl Error for DeviationAddError
impl Error for DeviationAddError
1.30.0 · 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()
Source§impl PartialEq for DeviationAddError
impl PartialEq for DeviationAddError
Source§fn eq(&self, other: &DeviationAddError) -> bool
fn eq(&self, other: &DeviationAddError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DeviationAddError
Auto Trait Implementations§
impl Freeze for DeviationAddError
impl RefUnwindSafe for DeviationAddError
impl Send for DeviationAddError
impl Sync for DeviationAddError
impl Unpin for DeviationAddError
impl UnsafeUnpin for DeviationAddError
impl UnwindSafe for DeviationAddError
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