#[non_exhaustive]pub enum ReversePath {
Null,
Mailbox(Mailbox),
}Expand description
A validated SMTP reverse-path for MAIL FROM.
RFC 5321 Section 4.1.1.2: Reverse-path = Path / "<>".
A null reverse-path (<>) indicates a bounce message.
Obsolete source routes in Path syntax are accepted but ignored per
RFC 5321 Section 4.1.2.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl ReversePath
impl ReversePath
Sourcepub fn new(s: impl Into<String>) -> Result<Self, ValidationError>
pub fn new(s: impl Into<String>) -> Result<Self, ValidationError>
Create from a string. An empty string produces Null.
Sourcepub fn requires_smtputf8(&self) -> bool
pub fn requires_smtputf8(&self) -> bool
Returns true if this is a non-null path with non-ASCII characters,
requiring the SMTPUTF8 extension (RFC 6531 Sections 3.3-3.4).
Trait Implementations§
Source§impl Clone for ReversePath
impl Clone for ReversePath
Source§fn clone(&self) -> ReversePath
fn clone(&self) -> ReversePath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReversePath
impl Debug for ReversePath
Source§impl Display for ReversePath
impl Display for ReversePath
Source§impl Hash for ReversePath
impl Hash for ReversePath
Source§impl PartialEq for ReversePath
impl PartialEq for ReversePath
Source§impl TryFrom<&str> for ReversePath
impl TryFrom<&str> for ReversePath
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for ReversePath
impl TryFrom<String> for ReversePath
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
impl Eq for ReversePath
impl StructuralPartialEq for ReversePath
Auto Trait Implementations§
impl Freeze for ReversePath
impl RefUnwindSafe for ReversePath
impl Send for ReversePath
impl Sync for ReversePath
impl Unpin for ReversePath
impl UnsafeUnpin for ReversePath
impl UnwindSafe for ReversePath
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