pub struct WebhookNotificationSender { /* private fields */ }
Implementations§
Source§impl WebhookNotificationSender
impl WebhookNotificationSender
pub fn new(url: String, category: String, notifications: Vec<String>) -> Self
Sourcepub async fn send_notification(&self, params: NotificationData)
pub async fn send_notification(&self, params: NotificationData)
Sends a notification via configured webhook
Formats and sends the notification based on the webhook type (wecom, dingtalk, etc). Will log success/failure and handle timeouts.
§Arguments
params
- The notification parameters including category, level, message and optional remark
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebhookNotificationSender
impl RefUnwindSafe for WebhookNotificationSender
impl Send for WebhookNotificationSender
impl Sync for WebhookNotificationSender
impl Unpin for WebhookNotificationSender
impl UnwindSafe for WebhookNotificationSender
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