pub struct Webhook { /* private fields */ }Implementations§
Source§impl Webhook
impl Webhook
pub fn new(secret: &str) -> Result<Self, WebhookError>
pub fn from_bytes(secret: Vec<u8>) -> Result<Self, WebhookError>
pub fn verify( &self, payload: &[u8], headers: &HeaderMap, ) -> Result<(), WebhookError>
pub fn sign( &self, msg_id: &str, timestamp: i64, payload: &[u8], ) -> Result<String, WebhookError>
Auto Trait Implementations§
impl Freeze for Webhook
impl RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnwindSafe for Webhook
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