Enum br_email::Mail

source ·
pub enum Mail {
    Pop3(Pop3),
    Imap(Imap),
    Smtp(Smtp),
    None,
}

Variants§

§

Pop3(Pop3)

§

Imap(Imap)

§

Smtp(Smtp)

§

None

Implementations§

source§

impl Mail

source

pub fn load(path: &str) -> Self

source

pub fn new(conf: JsonValue) -> Self

source

pub fn del(conf: JsonValue)

source

pub fn connection(&mut self, name: &str) -> Self

source

pub fn add_connection(&mut self, name: &str, connection: JsonValue) -> &mut Mail

Trait Implementations§

source§

impl Clone for Mail

source§

fn clone(&self) -> Mail

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Mode for Mail

source§

fn mail_id_max(&mut self) -> Result<u32, String>

获取最大ID

source§

fn mail_id_list(&mut self) -> Result<Vec<String>, String>

获取指定量ID列表
source§

fn mail_id_get(&mut self, mail_id: u32) -> Result<Vec<u8>, String>

获取指定邮件
source§

fn mail_msg_size(&mut self, mail_id: u32) -> Result<u32, String>

获取邮件尺寸
source§

fn mail_msg_uidl(&mut self, mail_id: u32) -> Result<String, String>

source§

fn send(&mut self) -> Result<Vec<u8>, String>

发送邮件
source§

fn set_from(&mut self, name: &str, mail: &str) -> &mut Self

设置发件人信息
source§

fn set_to(&mut self, to_vec: Vec<String>) -> &mut Self

收件人 Read more
source§

fn set_cc(&mut self, cc_vec: Vec<String>) -> &mut Self

抄送人 Read more
source§

fn set_subject(&mut self, subject: &str) -> &mut Self

设置主题
source§

fn set_body(&mut self, text: &str, html: &str) -> &mut Self

设置内容
source§

fn set_file( &mut self, name: &str, data: Vec<u8>, content_type: &str ) -> &mut Self

设置文件

Auto Trait Implementations§

§

impl RefUnwindSafe for Mail

§

impl Send for Mail

§

impl Sync for Mail

§

impl Unpin for Mail

§

impl UnwindSafe for Mail

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Chain<T> for T

§

fn len(&self) -> usize

The number of items that this chain link consists of.
§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
§

impl<T> Container<T> for Twhere T: Clone,

§

type Iter = Once<T>

An iterator over the items within this container, by value.
§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere 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.
source§

impl<T, U> TryInto<U> for Twhere 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<T> OrderedContainer<T> for Twhere T: Clone,