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
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
sourcefn 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
impl Eq for Response
impl StructuralEq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more