Struct standardwebhooks::Webhook
source · 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 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