Struct DomainPart
pub struct DomainPart(/* private fields */);Expand description
Email domain-part text.
Implementations§
§impl DomainPart
impl DomainPart
pub fn new(value: impl AsRef<str>) -> Result<DomainPart, AddressValidationError>
pub fn new(value: impl AsRef<str>) -> Result<DomainPart, AddressValidationError>
Creates a domain part using practical validation.
pub fn new_with_mode(
value: impl AsRef<str>,
mode: AddressValidationMode,
) -> Result<DomainPart, AddressValidationError>
pub fn new_with_mode( value: impl AsRef<str>, mode: AddressValidationMode, ) -> Result<DomainPart, AddressValidationError>
Creates a domain part using the requested validation mode.
Trait Implementations§
§impl AsRef<str> for DomainPart
impl AsRef<str> for DomainPart
§impl Clone for DomainPart
impl Clone for DomainPart
§fn clone(&self) -> DomainPart
fn clone(&self) -> DomainPart
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 more§impl Debug for DomainPart
impl Debug for DomainPart
§impl Display for DomainPart
impl Display for DomainPart
§impl FromStr for DomainPart
impl FromStr for DomainPart
§type Err = AddressValidationError
type Err = AddressValidationError
The associated error which can be returned from parsing.
§fn from_str(value: &str) -> Result<DomainPart, <DomainPart as FromStr>::Err>
fn from_str(value: &str) -> Result<DomainPart, <DomainPart as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for DomainPart
impl Hash for DomainPart
§impl Ord for DomainPart
impl Ord for DomainPart
§impl PartialEq for DomainPart
impl PartialEq for DomainPart
§impl PartialOrd for DomainPart
impl PartialOrd for DomainPart
§impl TryFrom<&str> for DomainPart
impl TryFrom<&str> for DomainPart
§type Error = AddressValidationError
type Error = AddressValidationError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<DomainPart, <DomainPart as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<DomainPart, <DomainPart as TryFrom<&str>>::Error>
Performs the conversion.
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