pub struct ImapBuilder { /* private fields */ }Expand description
Builder for IMAP messages (client commands and server responses).
Implementations§
Source§impl ImapBuilder
impl ImapBuilder
pub fn new() -> Self
Sourcepub fn untagged(
self,
status: impl Into<String>,
text: impl Into<String>,
) -> Self
pub fn untagged( self, status: impl Into<String>, text: impl Into<String>, ) -> Self
Untagged response: * STATUS [text]
Sourcepub fn continuation(self, text: impl Into<String>) -> Self
pub fn continuation(self, text: impl Into<String>) -> Self
Continuation request: + [text]
Sourcepub fn tagged_response(
self,
tag: impl Into<String>,
status: impl Into<String>,
text: impl Into<String>,
) -> Self
pub fn tagged_response( self, tag: impl Into<String>, status: impl Into<String>, text: impl Into<String>, ) -> Self
Tagged response: tag STATUS [text]
Sourcepub fn server_greeting(self, text: impl Into<String>) -> Self
pub fn server_greeting(self, text: impl Into<String>) -> Self
* OK IMAP4rev1 Service Ready (server greeting).
Sourcepub fn capability(self, caps: impl Into<String>) -> Self
pub fn capability(self, caps: impl Into<String>) -> Self
* CAPABILITY [capabilities]
Sourcepub fn expunge_notify(self, n: u32) -> Self
pub fn expunge_notify(self, n: u32) -> Self
* N EXPUNGE (message N was expunged).
Sourcepub fn capability_cmd(self, tag: impl Into<String>) -> Self
pub fn capability_cmd(self, tag: impl Into<String>) -> Self
tag CAPABILITY
Sourcepub fn login(
self,
tag: impl Into<String>,
user: impl Into<String>,
pass: impl Into<String>,
) -> Self
pub fn login( self, tag: impl Into<String>, user: impl Into<String>, pass: impl Into<String>, ) -> Self
tag LOGIN <user> <pass>
Sourcepub fn authenticate(
self,
tag: impl Into<String>,
mechanism: impl Into<String>,
) -> Self
pub fn authenticate( self, tag: impl Into<String>, mechanism: impl Into<String>, ) -> Self
tag AUTHENTICATE <mechanism>
Sourcepub fn select(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
pub fn select(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
tag SELECT <mailbox>
Sourcepub fn examine(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
pub fn examine(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
tag EXAMINE <mailbox>
Sourcepub fn create(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
pub fn create(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
tag CREATE <mailbox>
Sourcepub fn delete(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
pub fn delete(self, tag: impl Into<String>, mailbox: impl Into<String>) -> Self
tag DELETE <mailbox>
Sourcepub fn rename(
self,
tag: impl Into<String>,
old: impl Into<String>,
new_name: impl Into<String>,
) -> Self
pub fn rename( self, tag: impl Into<String>, old: impl Into<String>, new_name: impl Into<String>, ) -> Self
tag RENAME <old> <new>
Sourcepub fn list(
self,
tag: impl Into<String>,
reference: impl Into<String>,
pattern: impl Into<String>,
) -> Self
pub fn list( self, tag: impl Into<String>, reference: impl Into<String>, pattern: impl Into<String>, ) -> Self
tag LIST <ref> <pattern>
Sourcepub fn subscribe(
self,
tag: impl Into<String>,
mailbox: impl Into<String>,
) -> Self
pub fn subscribe( self, tag: impl Into<String>, mailbox: impl Into<String>, ) -> Self
tag SUBSCRIBE <mailbox>
Sourcepub fn unsubscribe(
self,
tag: impl Into<String>,
mailbox: impl Into<String>,
) -> Self
pub fn unsubscribe( self, tag: impl Into<String>, mailbox: impl Into<String>, ) -> Self
tag UNSUBSCRIBE <mailbox>
Sourcepub fn status_cmd(
self,
tag: impl Into<String>,
mailbox: impl Into<String>,
items: impl Into<String>,
) -> Self
pub fn status_cmd( self, tag: impl Into<String>, mailbox: impl Into<String>, items: impl Into<String>, ) -> Self
tag STATUS <mailbox> (<items>)
Sourcepub fn fetch(
self,
tag: impl Into<String>,
sequence: impl Into<String>,
items: impl Into<String>,
) -> Self
pub fn fetch( self, tag: impl Into<String>, sequence: impl Into<String>, items: impl Into<String>, ) -> Self
tag FETCH <sequence> <items>
Sourcepub fn store(
self,
tag: impl Into<String>,
sequence: impl Into<String>,
mode: impl Into<String>,
flags: impl Into<String>,
) -> Self
pub fn store( self, tag: impl Into<String>, sequence: impl Into<String>, mode: impl Into<String>, flags: impl Into<String>, ) -> Self
tag STORE <sequence> <flags>
Sourcepub fn search(self, tag: impl Into<String>, criteria: impl Into<String>) -> Self
pub fn search(self, tag: impl Into<String>, criteria: impl Into<String>) -> Self
tag SEARCH <criteria>
Sourcepub fn copy(
self,
tag: impl Into<String>,
sequence: impl Into<String>,
mailbox: impl Into<String>,
) -> Self
pub fn copy( self, tag: impl Into<String>, sequence: impl Into<String>, mailbox: impl Into<String>, ) -> Self
tag COPY <sequence> <mailbox>
Sourcepub fn uid(
self,
tag: impl Into<String>,
command: impl Into<String>,
args: impl Into<String>,
) -> Self
pub fn uid( self, tag: impl Into<String>, command: impl Into<String>, args: impl Into<String>, ) -> Self
tag UID <command> <args>
pub fn build(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for ImapBuilder
impl Clone for ImapBuilder
Source§fn clone(&self) -> ImapBuilder
fn clone(&self) -> ImapBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImapBuilder
impl Debug for ImapBuilder
Auto Trait Implementations§
impl Freeze for ImapBuilder
impl RefUnwindSafe for ImapBuilder
impl Send for ImapBuilder
impl Sync for ImapBuilder
impl Unpin for ImapBuilder
impl UnsafeUnpin for ImapBuilder
impl UnwindSafe for ImapBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more