Struct email::backend::Backend

source ·
pub struct Backend<C> {
Show 20 fields pub account_config: AccountConfig, pub add_folder: Option<Box<dyn AddFolder>>, pub list_folders: Option<Box<dyn ListFolders>>, pub expunge_folder: Option<Box<dyn ExpungeFolder>>, pub purge_folder: Option<Box<dyn PurgeFolder>>, pub delete_folder: Option<Box<dyn DeleteFolder>>, pub list_envelopes: Option<Box<dyn ListEnvelopes>>, pub watch_envelopes: Option<Box<dyn WatchEnvelopes>>, pub get_envelope: Option<Box<dyn GetEnvelope>>, pub add_flags: Option<Box<dyn AddFlags>>, pub set_flags: Option<Box<dyn SetFlags>>, pub remove_flags: Option<Box<dyn RemoveFlags>>, pub add_raw_message: Option<Box<dyn AddRawMessage>>, pub add_raw_message_with_flags: Option<Box<dyn AddRawMessageWithFlags>>, pub get_messages: Option<Box<dyn GetMessages>>, pub peek_messages: Option<Box<dyn PeekMessages>>, pub copy_messages: Option<Box<dyn CopyMessages>>, pub move_messages: Option<Box<dyn MoveMessages>>, pub delete_messages: Option<Box<dyn DeleteMessages>>, pub send_raw_message: Option<Box<dyn SendRawMessage>>, /* private fields */
}

Fields§

§account_config: AccountConfig§add_folder: Option<Box<dyn AddFolder>>§list_folders: Option<Box<dyn ListFolders>>§expunge_folder: Option<Box<dyn ExpungeFolder>>§purge_folder: Option<Box<dyn PurgeFolder>>§delete_folder: Option<Box<dyn DeleteFolder>>§list_envelopes: Option<Box<dyn ListEnvelopes>>§watch_envelopes: Option<Box<dyn WatchEnvelopes>>§get_envelope: Option<Box<dyn GetEnvelope>>§add_flags: Option<Box<dyn AddFlags>>§set_flags: Option<Box<dyn SetFlags>>§remove_flags: Option<Box<dyn RemoveFlags>>§add_raw_message: Option<Box<dyn AddRawMessage>>§add_raw_message_with_flags: Option<Box<dyn AddRawMessageWithFlags>>§get_messages: Option<Box<dyn GetMessages>>§peek_messages: Option<Box<dyn PeekMessages>>§copy_messages: Option<Box<dyn CopyMessages>>§move_messages: Option<Box<dyn MoveMessages>>§delete_messages: Option<Box<dyn DeleteMessages>>§send_raw_message: Option<Box<dyn SendRawMessage>>

Implementations§

source§

impl<C> Backend<C>

source

pub fn new(account_config: AccountConfig, context: C) -> Backend<C>

source

pub fn set_add_folder(&mut self, feature: Option<Box<dyn AddFolder>>)

source

pub fn set_list_folders(&mut self, feature: Option<Box<dyn ListFolders>>)

source

pub fn set_expunge_folder(&mut self, feature: Option<Box<dyn ExpungeFolder>>)

source

pub fn set_purge_folder(&mut self, feature: Option<Box<dyn PurgeFolder>>)

source

pub fn set_delete_folder(&mut self, feature: Option<Box<dyn DeleteFolder>>)

source

pub fn set_list_envelopes(&mut self, feature: Option<Box<dyn ListEnvelopes>>)

source

pub fn set_watch_envelopes(&mut self, feature: Option<Box<dyn WatchEnvelopes>>)

source

pub fn set_get_envelope(&mut self, feature: Option<Box<dyn GetEnvelope>>)

source

pub fn set_add_flags(&mut self, feature: Option<Box<dyn AddFlags>>)

source

pub fn set_set_flags(&mut self, feature: Option<Box<dyn SetFlags>>)

source

pub fn set_remove_flags(&mut self, feature: Option<Box<dyn RemoveFlags>>)

source

pub fn set_add_raw_message_with_flags( &mut self, feature: Option<Box<dyn AddRawMessageWithFlags>> )

source

pub fn set_get_messages(&mut self, feature: Option<Box<dyn GetMessages>>)

source

pub fn set_peek_messages(&mut self, feature: Option<Box<dyn PeekMessages>>)

source

pub fn set_copy_messages(&mut self, feature: Option<Box<dyn CopyMessages>>)

source

pub fn set_move_messages(&mut self, feature: Option<Box<dyn MoveMessages>>)

source

pub fn set_delete_messages(&mut self, feature: Option<Box<dyn DeleteMessages>>)

source

pub fn set_send_raw_message(&mut self, feature: Option<Box<dyn SendRawMessage>>)

source

pub async fn add_folder(&self, folder: &str) -> Result<()>

source

pub async fn list_folders(&self) -> Result<Folders>

source

pub async fn expunge_folder(&self, folder: &str) -> Result<()>

source

pub async fn purge_folder(&self, folder: &str) -> Result<()>

source

pub async fn delete_folder(&self, folder: &str) -> Result<()>

source

pub async fn list_envelopes( &self, folder: &str, page_size: usize, page: usize ) -> Result<Envelopes>

source

pub async fn watch_envelopes(&self, folder: &str) -> Result<()>

source

pub async fn get_envelope(&self, folder: &str, id: &Id) -> Result<Envelope>

source

pub async fn add_flags( &self, folder: &str, id: &Id, flags: &Flags ) -> Result<()>

source

pub async fn add_flag(&self, folder: &str, id: &Id, flag: Flag) -> Result<()>

source

pub async fn set_flags( &self, folder: &str, id: &Id, flags: &Flags ) -> Result<()>

source

pub async fn set_flag(&self, folder: &str, id: &Id, flag: Flag) -> Result<()>

source

pub async fn remove_flags( &self, folder: &str, id: &Id, flags: &Flags ) -> Result<()>

source

pub async fn remove_flag(&self, folder: &str, id: &Id, flag: Flag) -> Result<()>

source

pub async fn add_raw_message( &self, folder: &str, email: &[u8] ) -> Result<SingleId>

source

pub async fn add_raw_message_with_flags( &self, folder: &str, email: &[u8], flags: &Flags ) -> Result<SingleId>

source

pub async fn add_raw_message_with_flag( &self, folder: &str, email: &[u8], flag: Flag ) -> Result<SingleId>

source

pub async fn get_messages(&self, folder: &str, id: &Id) -> Result<Messages>

source

pub async fn peek_messages(&self, folder: &str, id: &Id) -> Result<Messages>

source

pub async fn copy_messages( &self, from_folder: &str, to_folder: &str, id: &Id ) -> Result<()>

source

pub async fn move_messages( &self, from_folder: &str, to_folder: &str, id: &Id ) -> Result<()>

source

pub async fn delete_messages(&self, folder: &str, id: &Id) -> Result<()>

source

pub async fn send_raw_message(&self, raw_msg: &[u8]) -> Result<()>

source

pub async fn send_reply_raw_message( &self, folder: &str, id: &SingleId, raw_msg: &[u8] ) -> Result<()>

Auto Trait Implementations§

§

impl<C> !RefUnwindSafe for Backend<C>

§

impl<C> Send for Backend<C>
where C: Send,

§

impl<C> Sync for Backend<C>
where C: Sync,

§

impl<C> Unpin for Backend<C>
where C: Unpin,

§

impl<C> !UnwindSafe for Backend<C>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

§

type Err = NoError

The error type produced by a failed conversion.
§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, Dst> ConvAsUtil<Dst> for T

§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
§

impl<T> ConvUtil for T

§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<Src> TryFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<Src> ValueFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeSync for T