pub enum DomainSegmentError {
IllegalHyphen(usize),
InvalidCharacter(char),
TooLong(usize),
EmptyString,
NonStandaloneWildcard,
}Expand description
Produced when attempting to construct a DomainSegment from
an invalid string.
Variants§
IllegalHyphen(usize)
Domain name segments can contain hyphens, but crucially:
- Not at the beginning of a segment.
- Not at the end of a segment.
- Not at the 3rd and 4th position simultaneously (used for Punycode encoding)
InvalidCharacter(char)
Segment contains invalid character.
TooLong(usize)
Domain segment is longer than the permitted 63 characters.
EmptyString
Domain segment is empty.
NonStandaloneWildcard
Domain segments can be wildcards, but must then only contain the wildcard.
Trait Implementations§
Source§impl Clone for DomainSegmentError
impl Clone for DomainSegmentError
Source§fn clone(&self) -> DomainSegmentError
fn clone(&self) -> DomainSegmentError
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 DomainSegmentError
impl Debug for DomainSegmentError
Source§impl Display for DomainSegmentError
impl Display for DomainSegmentError
Source§impl Error for DomainSegmentError
impl Error for DomainSegmentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DomainSegmentError> for FullyQualifiedDomainNameError
impl From<DomainSegmentError> for FullyQualifiedDomainNameError
Source§fn from(source: DomainSegmentError) -> Self
fn from(source: DomainSegmentError) -> Self
Converts to this type from the input type.
Source§impl From<DomainSegmentError> for PartiallyQualifiedDomainNameError
impl From<DomainSegmentError> for PartiallyQualifiedDomainNameError
Source§fn from(source: DomainSegmentError) -> Self
fn from(source: DomainSegmentError) -> Self
Converts to this type from the input type.
Source§impl Ord for DomainSegmentError
impl Ord for DomainSegmentError
Source§fn cmp(&self, other: &DomainSegmentError) -> Ordering
fn cmp(&self, other: &DomainSegmentError) -> Ordering
1.21.0 · 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 DomainSegmentError
impl PartialEq for DomainSegmentError
Source§impl PartialOrd for DomainSegmentError
impl PartialOrd for DomainSegmentError
impl Eq for DomainSegmentError
impl StructuralPartialEq for DomainSegmentError
Auto Trait Implementations§
impl Freeze for DomainSegmentError
impl RefUnwindSafe for DomainSegmentError
impl Send for DomainSegmentError
impl Sync for DomainSegmentError
impl Unpin for DomainSegmentError
impl UnwindSafe for DomainSegmentError
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