convert_case

Trait Casing

Source
pub trait Casing {
    // Required methods
    fn to_case(&self, case: Case) -> String;
    fn from_case(&self, case: Case) -> FromCasing;
}
Expand description

Describes items that can be converted into a case.

Implemented for string slices &str and owned strings String.

Required Methods§

Source

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

References self and converts to the given case.

Source

fn from_case(&self, case: Case) -> FromCasing

Creates a FromCasing struct, which saves information about how to parse self before converting to a case.

Implementations on Foreign Types§

Source§

impl Casing for str

Source§

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

Source§

fn from_case(&self, case: Case) -> FromCasing

Source§

impl Casing for String

Source§

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

Source§

fn from_case(&self, case: Case) -> FromCasing

Implementors§