[][src]Struct postal_rs::Client

pub struct Client { /* fields omitted */ }

Client holds a session information

Implementations

impl Client[src]

pub fn new<U, S>(url: U, token: S) -> Result<Self, PostalError> where
    U: AsRef<str>,
    S: Into<String>, 
[src]

Constructs a new instance of client

pub async fn send<M: Into<Message>, '_>(
    &'_ self,
    message: M
) -> Result<Vec<SendResult>, PostalError>
[src]

Sends a message to Postal

pub async fn send_raw<M: Into<RawMessage>, '_>(
    &'_ self,
    message: M
) -> Result<Vec<SendResult>, PostalError>
[src]

Sends a standart SMTP message to Postal

pub async fn get_message_details<I: Into<DetailsInterest>, '_>(
    &'_ self,
    interest: I
) -> Result<HashMap<String, Json>, PostalError>
[src]

Asks a Postal server to provide an information details about a message

By default it provides a limited information. To increase this volume you can specify expansions via DetailsInterest

pub async fn get_message_deliveries<'_>(
    &'_ self,
    id: MessageHash
) -> Result<Vec<HashMap<String, Json>>, PostalError>
[src]

Obtains a delivery information according to a message.

Trait Implementations

impl Clone for Client[src]

impl Debug for Client[src]

impl Eq for Client[src]

impl PartialEq<Client> for Client[src]

impl StructuralEq for Client[src]

impl StructuralPartialEq for Client[src]

Auto Trait Implementations

impl RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.