Skip to main content

Casing

Trait Casing 

Source
pub trait Casing<T: Display> {
    // Required methods
    fn to_case(&self, case: Case) -> String;
    fn is_case(&self, case: Case) -> bool;
}
Expand description

Casing

Shared string case conversion surface retained locally so workspace crates do not depend on canic-utils for text casing.

Required Methods§

Source

fn to_case(&self, case: Case) -> String

Convert the receiver into the requested case form.

Source

fn is_case(&self, case: Case) -> bool

Return whether the receiver is already in the requested case form.

Implementors§

Source§

impl<T: Display> Casing<T> for T
where String: PartialEq<T>,