#[non_exhaustive]pub enum PolicyViolation {
Algorithm {
operation: &'static str,
algorithm: String,
},
ResourceLimit {
resource: &'static str,
maximum: usize,
actual: usize,
},
InvalidResourceLimit {
resource: &'static str,
requirement: &'static str,
actual: usize,
},
KeyTrust {
reason: &'static str,
},
XmlInput {
reason: &'static str,
},
Uri {
operation: &'static str,
reason: &'static str,
},
KeySize {
operation: &'static str,
key_type: &'static str,
minimum_bits: usize,
maximum_bits: usize,
actual_bits: usize,
},
InvalidKeyMaterial {
operation: &'static str,
key_type: &'static str,
reason: &'static str,
},
}Expand description
A typed rejection produced by an operation 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.
Algorithm
An algorithm is outside the operation allowlist.
Fields
ResourceLimit
An input exceeds a configured resource ceiling.
Fields
InvalidResourceLimit
A configured resource limit violates a structural policy requirement.
Fields
KeyTrust
The selected key source or trust mode is disallowed.
XmlInput
XML parser behavior is disallowed.
Uri
A URI class is outside the operation policy.
Fields
KeySize
An RSA key falls outside the operation’s configured strength range.
Fields
InvalidKeyMaterial
RSA key material is structurally invalid.
Trait Implementations§
Source§impl Clone for PolicyViolation
impl Clone for PolicyViolation
Source§fn clone(&self) -> PolicyViolation
fn clone(&self) -> PolicyViolation
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 PolicyViolation
impl Debug for PolicyViolation
Source§impl Display for PolicyViolation
impl Display for PolicyViolation
impl Eq for PolicyViolation
Source§impl Error for PolicyViolation
impl Error for PolicyViolation
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 From<PolicyViolation> for SignatureBuilderError
impl From<PolicyViolation> for SignatureBuilderError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for XmlMutationError
impl From<PolicyViolation> for XmlMutationError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for ParseError
impl From<PolicyViolation> for ParseError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for SigningDigestError
impl From<PolicyViolation> for SigningDigestError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for SigningError
impl From<PolicyViolation> for SigningError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for SignatureVerificationError
impl From<PolicyViolation> for SignatureVerificationError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for TransformError
impl From<PolicyViolation> for TransformError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for ReferenceProcessingError
impl From<PolicyViolation> for ReferenceProcessingError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl From<PolicyViolation> for DsigError
impl From<PolicyViolation> for DsigError
Source§fn from(source: PolicyViolation) -> Self
fn from(source: PolicyViolation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PolicyViolation
impl PartialEq for PolicyViolation
impl StructuralPartialEq for PolicyViolation
Auto Trait Implementations§
impl Freeze for PolicyViolation
impl RefUnwindSafe for PolicyViolation
impl Send for PolicyViolation
impl Sync for PolicyViolation
impl Unpin for PolicyViolation
impl UnsafeUnpin for PolicyViolation
impl UnwindSafe for PolicyViolation
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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