pub struct KebabCaseValidator;Expand description
A validator for kebab-case strings.
Rules:
- Only lowercase letters, digits, and hyphens are allowed.
- The string must start with a lowercase letter.
§Examples of valid kebab-case
valid-kebab-casekebab-case-123
§Examples of invalid kebab-case
Invalid-Kebab-Case(contains uppercase letters)invalid_kebab_case!(contains special characters)1invalid-kebab-case(starts with a digit)
§Example
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KebabCaseValidator
impl RefUnwindSafe for KebabCaseValidator
impl Send for KebabCaseValidator
impl Sync for KebabCaseValidator
impl Unpin for KebabCaseValidator
impl UnwindSafe for KebabCaseValidator
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