pub struct WebhookHandler { /* private fields */ }Expand description
Webhook handler
Implementations§
Source§impl WebhookHandler
impl WebhookHandler
Sourcepub fn new(config: WebhookHandlerConfig) -> Self
pub fn new(config: WebhookHandlerConfig) -> Self
Create a new webhook handler
Sourcepub async fn process_event(
&self,
event: WebhookEvent,
) -> Result<WebhookProcessingResult>
pub async fn process_event( &self, event: WebhookEvent, ) -> Result<WebhookProcessingResult>
Process a webhook event
Sourcepub async fn get_event_log(&self) -> Vec<WebhookEvent>
pub async fn get_event_log(&self) -> Vec<WebhookEvent>
Get the event log
Sourcepub async fn clear_event_log(&self)
pub async fn clear_event_log(&self)
Clear the event log
Sourcepub async fn event_log_size(&self) -> usize
pub async fn event_log_size(&self) -> usize
Get the number of events in the log
Sourcepub async fn update_config(&self, config: WebhookHandlerConfig)
pub async fn update_config(&self, config: WebhookHandlerConfig)
Update the configuration
Sourcepub async fn get_config(&self) -> WebhookHandlerConfig
pub async fn get_config(&self) -> WebhookHandlerConfig
Get the current configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebhookHandler
impl !RefUnwindSafe for WebhookHandler
impl Send for WebhookHandler
impl Sync for WebhookHandler
impl Unpin for WebhookHandler
impl !UnwindSafe for WebhookHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more