pub enum ToCase {
KebabCase,
CamelCase,
PascalCase,
ShoutyKebabCase,
ShoutySnakeCase,
SnakeCase,
TrainCase,
}
Expand description
clap::ValueEnum to convert input string to a target case
Variants§
Implementations§
Source§impl ToCase
impl ToCase
pub fn variant_name(&self) -> &'static str
pub fn convert<T: Display>(&self, input: T) -> String
pub fn variant_name_with_to_prefix(&self) -> String
pub fn variant_name_with_case_suffix(&self) -> String
pub fn variant_name_with_prefix_and_suffix(&self) -> String
pub fn base_variant_names(&self) -> [String; 4]
pub fn variant_names(&self) -> Vec<String>
pub fn variants<'a>() -> &'a [ToCase]
Trait Implementations§
Source§impl Ord for ToCase
impl Ord for ToCase
Source§impl PartialOrd for ToCase
impl PartialOrd for ToCase
impl Copy for ToCase
impl Eq for ToCase
impl StructuralPartialEq for ToCase
Auto Trait Implementations§
impl Freeze for ToCase
impl RefUnwindSafe for ToCase
impl Send for ToCase
impl Sync for ToCase
impl Unpin for ToCase
impl UnwindSafe for ToCase
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