[][src]Struct new_tokio_smtp::response::Response

pub struct Response { /* fields omitted */ }

response of a smtp server

Implementations

impl Response[src]

pub fn new(code: ResponseCode, lines: Vec<String>) -> Self[src]

crate a new Response from a response code and a number of lines

If lines is empty a single empty line will be pushed to the lines Vec.

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

true if the response code is unknown or indicates an error

pub fn code(&self) -> ResponseCode[src]

return the response code

pub fn msg(&self) -> &[String][src]

returns the lines of the msg/payload

this will have at last one line, throuhg this line might be empty

Trait Implementations

impl Clone for Response[src]

impl Debug for Response[src]

impl Eq for Response[src]

impl Hash for Response[src]

impl PartialEq<Response> 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> 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.