#[non_exhaustive]pub enum WebhookError {
MalformedSignature,
InvalidSignature,
Expired {
max_age_secs: u64,
},
Parse(Error),
Handler(Box<dyn StdError + Send + Sync>),
Api(Error),
}Expand description
Failures from verifying, parsing, or registering a webhook.
#[non_exhaustive]: new variants may be added in future releases, so
downstream match statements must include a _ => arm.
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.
MalformedSignature
The signature header was absent, or not a sha256=<hex> value.
InvalidSignature
The signature did not match the body under the configured secret.
Expired
The event is older than the configured maximum age. Only returned when
Webhooks::max_event_age is set.
Parse(Error)
The body verified but was not a well-formed delivery, or its payload did not match the type its event declares.
Handler(Box<dyn StdError + Send + Sync>)
A registered handler failed while processing the delivery.
Api(Error)
Registering the listener with One failed.
Trait Implementations§
Source§impl Debug for WebhookError
impl Debug for WebhookError
Source§impl Display for WebhookError
impl Display for WebhookError
Source§impl Error for WebhookError
impl Error for WebhookError
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<Error> for WebhookError
impl From<Error> for WebhookError
Auto Trait Implementations§
impl !Freeze for WebhookError
impl !RefUnwindSafe for WebhookError
impl !UnwindSafe for WebhookError
impl Forget for WebhookError
impl Move for WebhookError
impl Send for WebhookError
impl Sync for WebhookError
impl Unpin for WebhookError
impl UnsafeUnpin for WebhookErrorwhere
*const ErrorImpl is !null: UnsafeUnpin,
PhantomData<ErrorImpl>: UnsafeUnpin,
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
*const Inner is !null: UnsafeUnpin,
PhantomData<Inner>: UnsafeUnpin,
NonZeroU16Inner: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: 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