pub struct VerificationError { /* private fields */ }Expand description
Error returned by SignatureVerifier::verify_signature.
Carries a VerificationErrorKind and, optionally, the backend error
that caused it, available through core::error::Error::source.
Implementations§
Source§impl VerificationError
impl VerificationError
Sourcepub const fn new(kind: VerificationErrorKind) -> Self
pub const fn new(kind: VerificationErrorKind) -> Self
An error of the given kind with no underlying cause.
Sourcepub fn with_source(
kind: VerificationErrorKind,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_source( kind: VerificationErrorKind, source: impl Error + Send + Sync + 'static, ) -> Self
An error of the given kind caused by source, typically the
backend’s own error.
Sourcepub const fn unsupported_algorithm() -> Self
pub const fn unsupported_algorithm() -> Self
Shorthand for VerificationErrorKind::UnsupportedAlgorithm.
Sourcepub const fn unsupported_key() -> Self
pub const fn unsupported_key() -> Self
Shorthand for VerificationErrorKind::UnsupportedKey.
Sourcepub const fn malformed_key() -> Self
pub const fn malformed_key() -> Self
Shorthand for VerificationErrorKind::MalformedKey.
Sourcepub const fn invalid_signature() -> Self
pub const fn invalid_signature() -> Self
Shorthand for VerificationErrorKind::InvalidSignature.
Sourcepub const fn kind(&self) -> VerificationErrorKind
pub const fn kind(&self) -> VerificationErrorKind
What went wrong.
Trait Implementations§
Source§impl Debug for VerificationError
impl Debug for VerificationError
Source§impl Display for VerificationError
impl Display for VerificationError
Source§impl Error for VerificationError
impl Error for VerificationError
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<VerificationErrorKind> for VerificationError
impl From<VerificationErrorKind> for VerificationError
Source§fn from(kind: VerificationErrorKind) -> Self
fn from(kind: VerificationErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for VerificationError
impl !UnwindSafe for VerificationError
impl Forget for VerificationError
impl Freeze for VerificationError
impl Move for VerificationError
impl Send for VerificationError
impl Sync for VerificationError
impl Unpin for VerificationError
impl UnsafeUnpin for VerificationErrorwhere
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
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