chorus-core 0.1.0

Core traits and types for Chorus CPaaS
Documentation
1
2
3
4
5
6
7
8
9
use crate::error::ChorusError;
use crate::types::{EmailMessage, SendResult};
use async_trait::async_trait;

#[async_trait]
pub trait EmailSender: Send + Sync {
    fn provider_name(&self) -> &str;
    async fn send(&self, msg: &EmailMessage) -> Result<SendResult, ChorusError>;
}