pub enum PatternSegmentError {
IllegalHyphen(usize),
InvalidCharacter(char),
TooLong(usize),
EmptyString,
MultipleWildcards,
}Expand description
Produced when attempting to construct a PatternSegment
from an invalid string.
Variants§
IllegalHyphen(usize)
Domain name segments (and therefore pattern 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.
MultipleWildcards
Pattern contains more than one wildcard (*) character.
Trait Implementations§
Source§impl Clone for PatternSegmentError
impl Clone for PatternSegmentError
Source§fn clone(&self) -> PatternSegmentError
fn clone(&self) -> PatternSegmentError
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 PatternSegmentError
impl Debug for PatternSegmentError
Source§impl Display for PatternSegmentError
impl Display for PatternSegmentError
Source§impl Error for PatternSegmentError
impl Error for PatternSegmentError
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 Ord for PatternSegmentError
impl Ord for PatternSegmentError
Source§fn cmp(&self, other: &PatternSegmentError) -> Ordering
fn cmp(&self, other: &PatternSegmentError) -> 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 PatternSegmentError
impl PartialEq for PatternSegmentError
Source§impl PartialOrd for PatternSegmentError
impl PartialOrd for PatternSegmentError
impl Eq for PatternSegmentError
impl StructuralPartialEq for PatternSegmentError
Auto Trait Implementations§
impl Freeze for PatternSegmentError
impl RefUnwindSafe for PatternSegmentError
impl Send for PatternSegmentError
impl Sync for PatternSegmentError
impl Unpin for PatternSegmentError
impl UnwindSafe for PatternSegmentError
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