#[non_exhaustive]pub enum ForwardPath {
Postmaster,
Mailbox(Mailbox),
}Expand description
A validated SMTP forward-path for RCPT TO.
RFC 5321 Section 4.1.1.3: Forward-path = Path. Also accepts the
special <Postmaster> recipient.
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 ForwardPath
impl ForwardPath
Sourcepub fn new(s: impl Into<String>) -> Result<Self, ValidationError>
pub fn new(s: impl Into<String>) -> Result<Self, ValidationError>
Create from a string. Case-insensitive “postmaster” produces Postmaster.
Sourcepub fn requires_smtputf8(&self) -> bool
pub fn requires_smtputf8(&self) -> bool
Returns true if this is a non-postmaster path with non-ASCII characters.
Trait Implementations§
Source§impl Clone for ForwardPath
impl Clone for ForwardPath
Source§fn clone(&self) -> ForwardPath
fn clone(&self) -> ForwardPath
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 ForwardPath
impl Debug for ForwardPath
Source§impl Display for ForwardPath
impl Display for ForwardPath
Source§impl Hash for ForwardPath
impl Hash for ForwardPath
Source§impl PartialEq for ForwardPath
impl PartialEq for ForwardPath
Source§impl TryFrom<&str> for ForwardPath
impl TryFrom<&str> for ForwardPath
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for ForwardPath
impl TryFrom<String> for ForwardPath
Source§type Error = ValidationError
type Error = ValidationError
The type returned in the event of a conversion error.
impl Eq for ForwardPath
impl StructuralPartialEq for ForwardPath
Auto Trait Implementations§
impl Freeze for ForwardPath
impl RefUnwindSafe for ForwardPath
impl Send for ForwardPath
impl Sync for ForwardPath
impl Unpin for ForwardPath
impl UnsafeUnpin for ForwardPath
impl UnwindSafe for ForwardPath
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