#[non_exhaustive]pub enum PolicyBindingError {
UnsupportedAlgorithm {
alg: String,
},
EmptyHash,
InvalidBase64(DecodeError),
InvalidHashLength {
actual: usize,
},
InvalidHexHash,
}Expand description
Why PolicyBinding::validate rejected a policy binding.
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.
UnsupportedAlgorithm
alg is not a recognized policy binding algorithm (only HS256 is).
EmptyHash
hash is the empty string.
InvalidBase64(DecodeError)
hash is not padded standard-alphabet base64.
InvalidHashLength
hash is base64, but of neither a 32-byte HMAC-SHA256 nor its
64-character hex encoding.
InvalidHexHash
hash decodes to 64 bytes that are not all hexadecimal digits, so it
is not the legacy Base64(hex(HMAC-SHA256)) form.
Trait Implementations§
Source§impl Clone for PolicyBindingError
impl Clone for PolicyBindingError
Source§impl Debug for PolicyBindingError
impl Debug for PolicyBindingError
Source§impl Display for PolicyBindingError
impl Display for PolicyBindingError
impl Eq for PolicyBindingError
Source§impl Error for PolicyBindingError
impl Error for PolicyBindingError
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<DecodeError> for PolicyBindingError
impl From<DecodeError> for PolicyBindingError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PolicyBindingError
impl PartialEq for PolicyBindingError
impl StructuralPartialEq for PolicyBindingError
Auto Trait Implementations§
impl Forget for PolicyBindingError
impl Freeze for PolicyBindingError
impl RefUnwindSafe for PolicyBindingError
impl Send for PolicyBindingError
impl Sync for PolicyBindingError
impl Unpin for PolicyBindingError
impl UnsafeUnpin for PolicyBindingError
impl UnwindSafe for PolicyBindingError
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