sova-devtools 0.1.10

In-app DevTools bar for Sova (HTML inject, SSE timeline, request snapshots)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::collector::{DevToolsBag, MailLine};

pub fn collect_mail(bag: &DevToolsBag, mail: Option<&sova_mail::MailClient>) {
    if let Some(client) = mail {
        if let Some(fake) = client.fake() {
            for m in fake.sent().into_iter().rev().take(5) {
                bag.push_mail(MailLine {
                    to: m.to,
                    subject: m.subject,
                    backend: "fake".into(),
                });
            }
        }
    }
}