[][src]Struct lettre::smtp::response::Response

pub struct Response {
    pub code: Code,
    pub message: Vec<String>,
}

Contains an SMTP reply, with separated code and message

The text message is optional, only the code is mandatory

Fields

code: Code

Response code

message: Vec<String>

Server response string (optional) Handle multiline responses

Implementations

impl Response[src]

pub fn new(code: Code, message: Vec<String>) -> Response[src]

Creates a new Response

pub fn is_positive(&self) -> bool[src]

Tells if the response is positive

pub fn has_code(&self, code: u16) -> bool[src]

Tests code equality

pub fn first_word(&self) -> Option<&str>[src]

Returns only the first word of the message if possible

pub fn first_line(&self) -> Option<&str>[src]

Returns only the line of the message if possible

Trait Implementations

impl Clone for Response[src]

impl Debug for Response[src]

impl<'de> Deserialize<'de> for Response[src]

impl Eq for Response[src]

impl From<Response> for Error[src]

impl FromStr for Response[src]

type Err = NomErrorKind

The associated error which can be returned from parsing.

impl PartialEq<Response> for Response[src]

impl Serialize for Response[src]

impl StructuralEq for Response[src]

impl StructuralPartialEq for Response[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.