pub struct Command<'a> {
pub tag: Tag<'a>,
pub body: CommandBody<'a>,
}Fields
tag: Tag<'a>body: CommandBody<'a>Implementations
sourceimpl<'a> Command<'a>
impl<'a> Command<'a>
pub fn into_owned(self) -> Command<'static>
sourceimpl<'a> Command<'a>
impl<'a> Command<'a>
pub fn new(tag: Tag<'a>, kind: CommandBody<'a>) -> Self
pub fn capability() -> Command<'a>
pub fn noop() -> Command<'a>
pub fn logout() -> Command<'a>
pub fn authenticate(
mechanism: AuthMechanism<'a>,
initial_response: Option<&'a [u8]>
) -> Command<'a>
pub fn login<U: TryInto<AString<'a>>, P: TryInto<AString<'a>>>(
username: U,
password: P
) -> Result<Command<'a>, ()>
pub fn select<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn examine<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn create<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn delete<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn rename<M1, M2>(mailbox: M1, new_mailbox: M2) -> Result<Command<'a>, ()> where
M1: TryInto<Mailbox<'a>>,
M2: TryInto<Mailbox<'a>>,
pub fn subscribe<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn unsubscribe<M>(mailbox: M) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn list<A: TryInto<Mailbox<'a>>, B: TryInto<ListMailbox<'a>>>(
reference: A,
mailbox_wildcard: B
) -> Result<Command<'a>, ()>
pub fn lsub<A: TryInto<Mailbox<'a>>, B: TryInto<ListMailbox<'a>>>(
reference: A,
mailbox_wildcard: B
) -> Result<Command<'a>, ()>
pub fn status<M>(
mailbox: M,
attributes: Vec<StatusAttribute>
) -> Result<Command<'a>, M::Error> where
M: TryInto<Mailbox<'a>>,
pub fn append<M, D>(
mailbox: M,
flags: Vec<Flag<'a>>,
date: Option<MyDateTime>,
message: D
) -> Result<Command<'a>, ()> where
M: TryInto<Mailbox<'a>>,
D: TryInto<Literal<'a>>,
pub fn check() -> Command<'a>
pub fn close() -> Command<'a>
pub fn expunge() -> Command<'a>
pub fn search<C>(
charset: C,
criteria: SearchKey<'a>,
uid: bool
) -> Result<Command<'a>, C::Error> where
C: TryInto<Option<Charset<'a>>>,
pub fn fetch<S, I>(
sequence_set: S,
attributes: I,
uid: bool
) -> Result<Command<'a>, S::Error> where
S: TryInto<SequenceSet>,
I: Into<MacroOrFetchAttributes<'a>>,
pub fn store<S>(
sequence_set: S,
kind: StoreType,
response: StoreResponse,
flags: Vec<Flag<'a>>,
uid: bool
) -> Result<Command<'a>, S::Error> where
S: TryInto<SequenceSet>,
pub fn copy<S, M>(
sequence_set: S,
mailbox: M,
uid: bool
) -> Result<Command<'a>, ()> where
S: TryInto<SequenceSet>,
M: TryInto<Mailbox<'a>>,
pub fn name(&self) -> &'static str
Trait Implementations
impl<'a> Eq for Command<'a>
impl<'a> StructuralEq for Command<'a>
impl<'a> StructuralPartialEq for Command<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> Send for Command<'a>
impl<'a> Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> UnwindSafe for Command<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more