pub struct EmailStore { /* private fields */ }Expand description
Store for all sent emails, enabling retrospection via /_aws/ses.
Append-only: emails are added when SendEmail, SendRawEmail, or
SendTemplatedEmail is called. Emails can be queried by message ID
or source address, and cleared for test isolation.
Implementations§
Source§impl EmailStore
impl EmailStore
Sourcepub fn capture(&self, email: SentEmail) -> String
pub fn capture(&self, email: SentEmail) -> String
Store a sent email for retrospection. Returns the generated message ID.
Sourcepub fn query(
&self,
filter_id: Option<&str>,
filter_source: Option<&str>,
) -> Vec<SentEmail>
pub fn query( &self, filter_id: Option<&str>, filter_source: Option<&str>, ) -> Vec<SentEmail>
Query emails with optional filters.
Sourcepub fn total_sent(&self) -> u64
pub fn total_sent(&self) -> u64
Get the total number of emails sent (lifetime, not reset on clear).
Trait Implementations§
Source§impl Debug for EmailStore
impl Debug for EmailStore
Auto Trait Implementations§
impl !Freeze for EmailStore
impl !RefUnwindSafe for EmailStore
impl Send for EmailStore
impl Sync for EmailStore
impl Unpin for EmailStore
impl UnsafeUnpin for EmailStore
impl UnwindSafe for EmailStore
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