Struct new_tokio_smtp::response::Response [−][src]
pub struct Response { /* fields omitted */ }
response of a smtp server
Methods
impl Response
[src]
impl Response
pub fn new(code: ResponseCode, lines: Vec<String>) -> Self
[src]
pub fn new(code: ResponseCode, lines: Vec<String>) -> Self
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]
pub fn is_erroneous(&self) -> bool
true if the response code is unknown or indicates an error
pub fn code(&self) -> ResponseCode
[src]
pub fn code(&self) -> ResponseCode
return the response code
pub fn msg(&self) -> &[String]
[src]
pub fn msg(&self) -> &[String]
returns the lines of the msg/payload
this will have at last one line, throuhg this line might be empty
Trait Implementations
impl Debug for Response
[src]
impl Debug for Response
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Response
[src]
impl Clone for Response
fn clone(&self) -> Response
[src]
fn clone(&self) -> Response
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Eq for Response
[src]
impl Eq for Response
impl PartialEq for Response
[src]
impl PartialEq for Response
fn eq(&self, other: &Response) -> bool
[src]
fn eq(&self, other: &Response) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Response) -> bool
[src]
fn ne(&self, other: &Response) -> bool
This method tests for !=
.
impl Hash for Response
[src]
impl Hash for Response