Struct async_smtp::response::Response
source · pub struct Response {
pub code: Code,
pub message: Vec<String>,
}Expand description
Contains an SMTP reply, with separated code and message
The text message is optional, only the code is mandatory
Fields§
§code: CodeResponse code
message: Vec<String>Server response string (optional) Handle multiline responses
Implementations§
source§impl Response
impl Response
sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
Tells if the response is positive
sourcepub fn first_word(&self) -> Option<&str>
pub fn first_word(&self) -> Option<&str>
Returns only the first word of the message if possible
sourcepub fn first_line(&self) -> Option<&str>
pub fn first_line(&self) -> Option<&str>
Returns only the line of the message if possible