pub struct WebhookStore {
pub webhooks: Vec<Webhook>,
}Expand description
Storage for webhook configurations
Fields§
§webhooks: Vec<Webhook>Implementations§
Source§impl WebhookStore
impl WebhookStore
Sourcepub fn webhooks_path() -> PathBuf
pub fn webhooks_path() -> PathBuf
Get webhooks path
Sourcepub fn add_webhook(&mut self, webhook: Webhook) -> Result<()>
pub fn add_webhook(&mut self, webhook: Webhook) -> Result<()>
Add a webhook
Sourcepub fn remove_webhook(&mut self, name: &str) -> Result<()>
pub fn remove_webhook(&mut self, name: &str) -> Result<()>
Remove a webhook by name
Sourcepub fn get_webhook(&self, name: &str) -> Option<&Webhook>
pub fn get_webhook(&self, name: &str) -> Option<&Webhook>
Get a webhook by name
Sourcepub fn list_webhooks(&self) -> &[Webhook]
pub fn list_webhooks(&self) -> &[Webhook]
List all webhooks
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 moreSource§impl Debug for WebhookStore
impl Debug for WebhookStore
Source§impl Default for WebhookStore
impl Default for WebhookStore
Source§fn default() -> WebhookStore
fn default() -> WebhookStore
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WebhookStore
impl<'de> Deserialize<'de> for WebhookStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WebhookStore
impl RefUnwindSafe for WebhookStore
impl Send for WebhookStore
impl Sync for WebhookStore
impl Unpin for WebhookStore
impl UnsafeUnpin 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