cloudiful-notifier 0.2.1

Async notification delivery library for ntfy, generic webhooks, DingTalk robots, and SMTP email.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{DeliveryResult, MessageEnvelope, NotifierError};

#[allow(async_fn_in_trait)]
pub trait DeliveryChannel {
    async fn deliver(
        &self,
        http_client: &reqwest::Client,
        message: &MessageEnvelope,
    ) -> Result<DeliveryResult, NotifierError>;
}