pub struct WebhookConfig {
pub enabled: bool,
pub co2_threshold: u16,
pub radon_threshold: u32,
pub battery_threshold: u8,
pub cooldown_secs: u64,
pub endpoints: Vec<WebhookEndpoint>,
}Expand description
Webhook notification configuration.
Fields§
§enabled: boolWhether webhook notifications are enabled.
co2_threshold: u16CO2 threshold in ppm (triggers “co2_high” event).
radon_threshold: u32Radon threshold in Bq/m³ (triggers “radon_high” event).
battery_threshold: u8Battery threshold in % (triggers “battery_low” event when at or below).
cooldown_secs: u64Minimum interval between alerts per device per event type (in seconds).
endpoints: Vec<WebhookEndpoint>Webhook endpoints to notify.
Implementations§
Source§impl WebhookConfig
impl WebhookConfig
Sourcepub fn validate(&self) -> Vec<ValidationError>
pub fn validate(&self) -> Vec<ValidationError>
Validate webhook configuration.
Trait Implementations§
Source§impl Clone for WebhookConfig
impl Clone for WebhookConfig
Source§fn clone(&self) -> WebhookConfig
fn clone(&self) -> WebhookConfig
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 WebhookConfig
impl Debug for WebhookConfig
Source§impl Default for WebhookConfig
impl Default for WebhookConfig
Source§impl<'de> Deserialize<'de> for WebhookConfigwhere
WebhookConfig: Default,
impl<'de> Deserialize<'de> for WebhookConfigwhere
WebhookConfig: Default,
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 WebhookConfig
impl RefUnwindSafe for WebhookConfig
impl Send for WebhookConfig
impl Sync for WebhookConfig
impl Unpin for WebhookConfig
impl UnsafeUnpin for WebhookConfig
impl UnwindSafe for WebhookConfig
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