pub struct WebhookPlugin { /* private fields */ }Expand description
Process-wide WebhookPlugin singleton holding a WebhookVerifier.
Implementations§
Source§impl WebhookPlugin
Process-wide singleton management for WebhookPlugin.
impl WebhookPlugin
Process-wide singleton management for WebhookPlugin.
Sourcepub fn init(config: WebhookConfig) -> &'static Self
pub fn init(config: WebhookConfig) -> &'static Self
Initializes the global WebhookPlugin once with config.
§Arguments
WebhookConfig- Webhook endpoints and replay-cache configuration.
§Returns
&'static Self- Reference to the initialized global plugin.
Sourcepub fn get() -> Option<&'static Self>
pub fn get() -> Option<&'static Self>
Returns the initialized global WebhookPlugin, if initialized.
§Returns
Option<&'static Self>- Reference to the global plugin, orNone.
Sourcepub fn get_verifier(&self) -> &WebhookVerifier
pub fn get_verifier(&self) -> &WebhookVerifier
Trait Implementations§
Auto Trait Implementations§
impl Forget for WebhookPlugin
impl Freeze for WebhookPlugin
impl Move for WebhookPlugin
impl RefUnwindSafe for WebhookPluginwhere
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<[u8; 32], u64, BuildHasherDefault<DigestIdentityHasher>>>: RefUnwindSafe,
impl Send for WebhookPlugin
impl Sync for WebhookPlugin
impl Unpin for WebhookPlugin
impl UnsafeUnpin for WebhookPluginwhere
*const ArcInner<Vec<CompiledEndpoint>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<CompiledEndpoint>>>: UnsafeUnpin,
*const ArcInner<ReplayNonceCacheInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<ReplayNonceCacheInner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for WebhookPluginwhere
Arc<Vec<CompiledEndpoint>>: UnwindSafe,
Arc<ReplayNonceCacheInner>: UnwindSafe,
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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