Struct new_tokio_smtp::response::Response
source · pub struct Response { /* private fields */ }
Expand description
response of a smtp server
Implementations§
source§impl Response
impl Response
sourcepub fn new(code: ResponseCode, lines: Vec<String>) -> Self
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
.
sourcepub fn is_erroneous(&self) -> bool
pub fn is_erroneous(&self) -> bool
true if the response code is unknown or indicates an error
sourcepub fn code(&self) -> ResponseCode
pub fn code(&self) -> ResponseCode
return the response code