Struct maildir::Maildir
[−]
[src]
pub struct Maildir { /* fields omitted */ }
The main entry point for this library. This struct can be
instantiated from a path using the from
implementations.
The path passed in to the from
should be the root of the
maildir (the folder containing cur
, new
, and tmp
).
Methods
impl Maildir
[src]
fn count_new(&self) -> usize
Returns the number of messages found inside the new
maildir folder.
fn count_cur(&self) -> usize
Returns the number of messages found inside the cur
maildir folder.
fn list_new(&self) -> MailEntries
Returns an iterator over the messages inside the new
maildir folder. The order of messages in the iterator
is not specified, and is not guaranteed to be stable
over multiple invocations of this method.
fn list_cur(&self) -> MailEntries
Returns an iterator over the messages inside the cur
maildir folder. The order of messages in the iterator
is not specified, and is not guaranteed to be stable
over multiple invocations of this method.
fn move_new_to_cur(&self, id: &str) -> Result<()>
Moves a message from the new
maildir folder to the
cur
maildir folder. The id passed in should be
obtained from the iterator produced by list_new
.
fn find(&self, id: &str) -> Option<MailEntry>
Tries to find the message with the given id in the
maildir. This searches both the new
and the cur
folders.