pub struct WebhookStore { /* private fields */ }Expand description
Thread-safe in-memory webhook configuration store
Implementations§
Source§impl WebhookStore
impl WebhookStore
pub fn new() -> Self
pub async fn set( &self, task_id: &str, config_id: &str, config: PushNotificationConfig, ) -> Result<(), WebhookValidationError>
pub async fn get( &self, task_id: &str, config_id: &str, ) -> Option<PushNotificationConfig>
pub async fn list(&self, task_id: &str) -> Vec<StoredWebhookConfig>
pub async fn delete(&self, task_id: &str, config_id: &str) -> bool
pub async fn get_configs_for_task( &self, task_id: &str, ) -> Vec<PushNotificationConfig>
pub async fn remove_task(&self, task_id: &str)
Trait Implementations§
Source§impl Clone for WebhookStore
impl Clone for WebhookStore
Source§fn clone(&self) -> WebhookStore
fn clone(&self) -> WebhookStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebhookStore
impl !RefUnwindSafe for WebhookStore
impl Send for WebhookStore
impl Sync for WebhookStore
impl Unpin for WebhookStore
impl !UnwindSafe for WebhookStore
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