pub struct EmailServiceStats {
pub total_sent: u64,
pub total_delivered: u64,
pub total_failed: u64,
pub total_bounced: u64,
pub total_opened: u64,
pub total_clicked: u64,
pub avg_delivery_time_ms: Option<f64>,
pub queue_size: u64,
pub rate_limit_remaining: Option<u64>,
pub last_activity: Option<DateTime<Utc>>,
pub provider_stats: HashMap<String, Value>,
}Expand description
Email service statistics
Fields§
§total_sent: u64Total emails sent
total_delivered: u64Total emails delivered
total_failed: u64Total emails failed
total_bounced: u64Total emails bounced
total_opened: u64Total emails opened (if tracking enabled)
total_clicked: u64Total emails clicked (if tracking enabled)
avg_delivery_time_ms: Option<f64>Average delivery time in milliseconds
queue_size: u64Current queue size (scheduled emails)
rate_limit_remaining: Option<u64>Rate limit remaining (if applicable)
last_activity: Option<DateTime<Utc>>Last activity timestamp
provider_stats: HashMap<String, Value>Provider-specific statistics
Implementations§
Source§impl EmailServiceStats
impl EmailServiceStats
Sourcepub fn delivery_rate(&self) -> f64
pub fn delivery_rate(&self) -> f64
Calculate delivery rate
Sourcepub fn failure_rate(&self) -> f64
pub fn failure_rate(&self) -> f64
Calculate failure rate
Sourcepub fn bounce_rate(&self) -> f64
pub fn bounce_rate(&self) -> f64
Calculate bounce rate
Sourcepub fn click_rate(&self) -> f64
pub fn click_rate(&self) -> f64
Calculate click rate (if tracking enabled)
Sourcepub fn update_with_delivery_report(&mut self, report: &EmailDeliveryReport)
pub fn update_with_delivery_report(&mut self, report: &EmailDeliveryReport)
Update statistics with new delivery report
Trait Implementations§
Source§impl Clone for EmailServiceStats
impl Clone for EmailServiceStats
Source§impl Debug for EmailServiceStats
impl Debug for EmailServiceStats
Auto Trait Implementations§
impl Freeze for EmailServiceStats
impl RefUnwindSafe for EmailServiceStats
impl Send for EmailServiceStats
impl Sync for EmailServiceStats
impl Unpin for EmailServiceStats
impl UnsafeUnpin for EmailServiceStats
impl UnwindSafe for EmailServiceStats
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