pub enum CaseFormat {
CamelCase,
PascalCase,
SnakeCase,
ScreamingSnakeCase,
KebabCase,
ScreamingKebabCase,
}Expand description
Supported case formats for identifier conversion
Variants§
CamelCase
camelCase: firstName, lastName
PascalCase
PascalCase: FirstName, LastName
SnakeCase
snake_case: first_name, last_name
ScreamingSnakeCase
SCREAMING_SNAKE_CASE: FIRST_NAME, LAST_NAME
KebabCase
kebab-case: first-name, last-name
ScreamingKebabCase
SCREAMING-KEBAB-CASE: FIRST-NAME, LAST-NAME
Implementations§
Source§impl CaseFormat
impl CaseFormat
Sourcepub fn split_words(&self, text: &str) -> Vec<String>
pub fn split_words(&self, text: &str) -> Vec<String>
Splits a string into words based on this case format
Trait Implementations§
Source§impl Clone for CaseFormat
impl Clone for CaseFormat
Source§fn clone(&self) -> CaseFormat
fn clone(&self) -> CaseFormat
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 CaseFormat
impl Debug for CaseFormat
Source§impl PartialEq for CaseFormat
impl PartialEq for CaseFormat
impl Copy for CaseFormat
impl Eq for CaseFormat
impl StructuralPartialEq for CaseFormat
Auto Trait Implementations§
impl Freeze for CaseFormat
impl RefUnwindSafe for CaseFormat
impl Send for CaseFormat
impl Sync for CaseFormat
impl Unpin for CaseFormat
impl UnsafeUnpin for CaseFormat
impl UnwindSafe for CaseFormat
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