pub struct DomainPart(/* private fields */);Expand description
Email domain-part text.
Implementations§
Source§impl DomainPart
impl DomainPart
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, AddressValidationError>
pub fn new(value: impl AsRef<str>) -> Result<Self, AddressValidationError>
Creates a domain part using practical validation.
Sourcepub fn new_with_mode(
value: impl AsRef<str>,
mode: AddressValidationMode,
) -> Result<Self, AddressValidationError>
pub fn new_with_mode( value: impl AsRef<str>, mode: AddressValidationMode, ) -> Result<Self, AddressValidationError>
Creates a domain part using the requested validation mode.
Trait Implementations§
Source§impl AsRef<str> for DomainPart
impl AsRef<str> for DomainPart
Source§impl Clone for DomainPart
impl Clone for DomainPart
Source§fn clone(&self) -> DomainPart
fn clone(&self) -> DomainPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DomainPart
impl Debug for DomainPart
Source§impl Display for DomainPart
impl Display for DomainPart
Source§impl FromStr for DomainPart
impl FromStr for DomainPart
Source§impl Hash for DomainPart
impl Hash for DomainPart
Source§impl Ord for DomainPart
impl Ord for DomainPart
Source§fn cmp(&self, other: &DomainPart) -> Ordering
fn cmp(&self, other: &DomainPart) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DomainPart
impl PartialEq for DomainPart
Source§fn eq(&self, other: &DomainPart) -> bool
fn eq(&self, other: &DomainPart) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DomainPart
impl PartialOrd for DomainPart
Source§impl TryFrom<&str> for DomainPart
impl TryFrom<&str> for DomainPart
impl Eq for DomainPart
impl StructuralPartialEq for DomainPart
Auto Trait Implementations§
impl Freeze for DomainPart
impl RefUnwindSafe for DomainPart
impl Send for DomainPart
impl Sync for DomainPart
impl Unpin for DomainPart
impl UnsafeUnpin for DomainPart
impl UnwindSafe for DomainPart
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