Trait Casing
pub trait Casing<T: AsRef<str>>
Describes items that can be converted into a case. This trait is used
in conjunction with the StateConverter struct which is returned from a couple
methods on Casing.
Required Methods
fn to_case(&self, case: Case<'_>) -> StringConvert the string into the given case. It will reference
selfand create a newStringwith the same pattern and delimeter ascase. It will split on boundaries defined at [Boundary::defaults()].use ; assert_eq!;fn from_case(&self, case: Case<'_>) -> StateConverter<'_, T>Start the case conversion by storing the boundaries associated with the given case.
use ; assert_eq!;fn set_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>Creates a
StateConverterstruct initialized with the boundaries provided.use ; assert_eq!;fn remove_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>Creates a
StateConverterstruct initialized without the boundaries provided.use ; assert_eq!;fn is_case(&self, case: Case<'_>) -> boolDetermines if
selfis of the given case. This is done simply by applying the conversion and seeing if the result is the same.use ; assert!; assert!; assert!; assert!;