#[non_exhaustive]pub enum Hyphens {
Allow,
CheckFirstLast,
Check,
}
Expand description
The CheckHyphens mode.
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.
Allow
CheckHyphens=false: Do not place positional restrictions on hyphens.
This mode is used by the WHATWG URL Standard for normal User Agent processing (i.e. not conformance checking).
CheckFirstLast
Prohibit hyphens in the first and last position in the label but allow in the third and fourth position.
Note that this mode rejects real-world names, including some GitHub user pages.
Check
CheckHyphens=true: Prohibit hyphens in the first, third, fourth, and last position in the label.
Note that this mode rejects real-world names, including YouTube CDN nodes and some GitHub user pages.
Trait Implementations§
source§impl PartialEq for Hyphens
impl PartialEq for Hyphens
impl Copy for Hyphens
impl Eq for Hyphens
impl StructuralPartialEq for Hyphens
Auto Trait Implementations§
impl Freeze for Hyphens
impl RefUnwindSafe for Hyphens
impl Send for Hyphens
impl Sync for Hyphens
impl Unpin for Hyphens
impl UnwindSafe for Hyphens
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