#[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§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)