[][src]Struct new_tokio_smtp::ReversePath

pub struct ReversePath(_);

represents a reverse path, most times this is just a mail address

Note that this type is not supposed to contain the surrounding '<' and '>'. They will be added automatically.

Note that this can be an empty string, representing a empty reverse path (donated in smtp with <>).

Note that currently no parser is implemented and that the allowed grammar of the forward path changes depending on the EsmtKeywords in EHLO and on the parameters of the the MAIL command it's used in. This and the fact that part of the grammar of reverse paths are discouraged to be used makes it a bit of a wast of time to implement the grammar here. Through send_mail actually does know about SMTPUTF8 and keeps track of it.

Implementations

impl ReversePath[src]

pub fn as_str(&self) -> &str[src]

return the inner representation as &str

pub fn from_unchecked<I>(data: I) -> Self where
    I: Into<String>, 
[src]

create a new instance from a string without validating the input

impl ReversePath[src]

pub fn empty() -> Self[src]

creates an empty reverse path

In a mail command this will lead to "MAIL FROM:<>". Note that the '<','>' are not part of the content so the content is an empty string.

use new_tokio_smtp::ReversePath;

let rpath = ReversePath::empty();
assert_eq!(rpath.as_str(), "");

Trait Implementations

impl AsRef<str> for ReversePath[src]

impl Clone for ReversePath[src]

impl Debug for ReversePath[src]

impl Eq for ReversePath[src]

impl From<MailAddress> for ReversePath[src]

impl Hash for ReversePath[src]

impl Into<String> for ReversePath[src]

impl<'a> PartialEq<&'a str> for ReversePath[src]

impl PartialEq<ReversePath> for ReversePath[src]

impl PartialEq<String> for ReversePath[src]

impl PartialEq<str> for ReversePath[src]

impl StructuralEq for ReversePath[src]

impl StructuralPartialEq for ReversePath[src]

Auto Trait Implementations

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<T> From<T> 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.