pub struct ImapClient {
pub id: u8,
pub account_config: Arc<AccountConfig>,
pub imap_config: Arc<ImapConfig>,
pub client_builder: ImapClientBuilder,
/* private fields */
}
Expand description
The IMAP backend context.
This context is unsync, which means it cannot be shared between
threads. For the sync version, see [ImapContextSync
].
Fields§
§id: u8
§account_config: Arc<AccountConfig>
The account configuration.
imap_config: Arc<ImapConfig>
The IMAP configuration.
client_builder: ImapClientBuilder
The next gen IMAP client builder.
Implementations§
Source§impl ImapClient
impl ImapClient
pub fn ext_sort_supported(&self) -> bool
pub async fn noop(&mut self) -> Result<()>
pub async fn select_mailbox( &mut self, mbox: impl ToString, ) -> Result<SelectDataUnvalidated>
pub async fn examine_mailbox( &mut self, mbox: impl ToString, ) -> Result<SelectDataUnvalidated>
pub async fn create_mailbox(&mut self, mbox: impl ToString) -> Result<()>
pub async fn list_all_mailboxes( &mut self, config: &AccountConfig, ) -> Result<Folders>
pub async fn expunge_mailbox(&mut self, mbox: impl ToString) -> Result<usize>
pub async fn purge_mailbox(&mut self, mbox: impl ToString) -> Result<usize>
pub async fn delete_mailbox(&mut self, mbox: impl ToString) -> Result<()>
pub async fn fetch_envelopes(&mut self, uids: SequenceSet) -> Result<Envelopes>
pub async fn fetch_envelopes_map( &mut self, uids: SequenceSet, ) -> Result<HashMap<String, Envelope>>
pub async fn fetch_first_envelope(&mut self, uid: u32) -> Result<Envelope>
pub async fn fetch_envelopes_by_sequence( &mut self, seq: SequenceSet, ) -> Result<Envelopes>
pub async fn fetch_all_envelopes(&mut self) -> Result<Envelopes>
pub async fn sort_uids( &mut self, sort_criteria: impl IntoIterator<Item = SortCriterion> + Clone, search_criteria: impl IntoIterator<Item = SearchKey<'static>> + Clone, ) -> Result<Vec<NonZeroU32>>
pub async fn search_uids( &mut self, search_criteria: impl IntoIterator<Item = SearchKey<'static>> + Clone, ) -> Result<Vec<NonZeroU32>>
pub async fn sort_envelopes( &mut self, sort_criteria: impl IntoIterator<Item = SortCriterion> + Clone, search_criteria: impl IntoIterator<Item = SearchKey<'static>> + Clone, ) -> Result<Envelopes>
pub async fn thread_envelopes( &mut self, search_criteria: impl IntoIterator<Item = SearchKey<'static>> + Clone, ) -> Result<Vec<Thread>>
pub async fn idle( &mut self, wait_for_shutdown_request: &mut Receiver<()>, ) -> Result<()>
pub async fn add_flags( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<HashMap<NonZeroU32, Vec1<MessageDataItem<'static>>>>
pub async fn add_deleted_flag( &mut self, uids: SequenceSet, ) -> Result<HashMap<NonZeroU32, Vec1<MessageDataItem<'static>>>>
pub async fn add_deleted_flag_silently( &mut self, uids: SequenceSet, ) -> Result<()>
pub async fn add_flags_silently( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<()>
pub async fn set_flags( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<HashMap<NonZeroU32, Vec1<MessageDataItem<'static>>>>
pub async fn set_flags_silently( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<()>
pub async fn remove_flags( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<HashMap<NonZeroU32, Vec1<MessageDataItem<'static>>>>
pub async fn remove_flags_silently( &mut self, uids: SequenceSet, flags: impl IntoIterator<Item = Flag<'static>> + Clone, ) -> Result<()>
pub async fn add_message( &mut self, mbox: impl ToString, flags: impl IntoIterator<Item = Flag<'static>> + Clone, msg: impl AsRef<[u8]> + Clone, ) -> Result<NonZeroU32>
pub async fn fetch_messages(&mut self, uids: SequenceSet) -> Result<Messages>
pub async fn peek_messages(&mut self, uids: SequenceSet) -> Result<Messages>
pub async fn copy_messages( &mut self, uids: SequenceSet, mbox: impl ToString, ) -> Result<()>
pub async fn move_messages( &mut self, uids: SequenceSet, mbox: impl ToString, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ImapClient
impl !RefUnwindSafe for ImapClient
impl Send for ImapClient
impl !Sync for ImapClient
impl Unpin for ImapClient
impl !UnwindSafe for ImapClient
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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