[−][src]Struct trapmail::MailStore
Mail storage.
Methods
impl MailStore
[src]
pub fn new() -> Self
[src]
Construct a new MailStore
.
The path will be set from the environment or use a default, if not set.
pub fn with_root<P: Into<PathBuf>>(root: P) -> Self
[src]
Construct a new MailStore
with given path.
pub fn add(&self, mail: &Mail) -> Result<PathBuf, Error>
[src]
Add a mail to the MailStore
.
Returns the path where the mail has been stored.
pub fn iter_mails(&self) -> impl Iterator<Item = Result<Mail, Error>>
[src]
Iterate over all mails in storage.
Mails are ordered by timestamp.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MailStore
impl Send for MailStore
impl Sync for MailStore
impl Unpin for MailStore
impl UnwindSafe for MailStore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,