Struct async_smtp::smtp::response::Response
source · Expand description
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§
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
Trait Implementations§
source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more