pub struct WebhookSecret(/* private fields */);Available on crate feature
webhooks only.Expand description
A webhook signing secret: the key of the HMAC. Its Debug does not show it.
Implementations§
Source§impl WebhookSecret
impl WebhookSecret
Sourcepub fn new(secret: &str) -> Result<Self, WebhookError>
pub fn new(secret: &str) -> Result<Self, WebhookError>
The secret as Standard Webhooks writes it, whsec_<base64>; without the prefix, the base64 alone.
Sourcepub fn from_bytes(key: impl Into<Vec<u8>>) -> Self
pub fn from_bytes(key: impl Into<Vec<u8>>) -> Self
A secret of these key bytes.
Trait Implementations§
Source§impl Clone for WebhookSecret
impl Clone for WebhookSecret
Source§impl Debug for WebhookSecret
impl Debug for WebhookSecret
impl Eq for WebhookSecret
Source§impl PartialEq for WebhookSecret
impl PartialEq for WebhookSecret
impl StructuralPartialEq for WebhookSecret
Auto Trait Implementations§
impl Forget for WebhookSecret
impl Freeze for WebhookSecret
impl Move for WebhookSecret
impl RefUnwindSafe for WebhookSecret
impl Send for WebhookSecret
impl Sync for WebhookSecret
impl Unpin for WebhookSecret
impl UnsafeUnpin for WebhookSecret
impl UnwindSafe for WebhookSecret
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