pub struct Response { /* private fields */ }
Available on crate feature
smtp-transport
only.Expand description
Contains an SMTP reply, with separated code and message
The text message is optional, only the code is mandatory
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
source§impl PartialEq for Response
impl PartialEq for Response
impl Eq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more