[][src]Struct zamm_yang::codegen::NameTransform

pub struct NameTransform<'a> {
    pub words: Vec<&'a str>,
}

Struct that stores a name in a unified representation, allowing for conversions between different casing formats

Fields

words: Vec<&'a str>

The segmented component words of the name

Implementations

impl<'a> NameTransform<'a>[src]

pub fn from_camel_case(name: &str) -> NameTransform<'_>[src]

Parse a camel-cased name.

pub fn from_snake_case(name: &str) -> NameTransform<'_>[src]

Parse a snake-cased name.

pub fn from_kebab_case(name: &str) -> NameTransform<'_>[src]

Parse a kebab-cased name.

pub fn to_camel_case(&self) -> String[src]

Output a camel-case name.

pub fn to_snake_case(&self) -> String[src]

Output a snake-case name.

pub fn to_kebab_case(&self) -> String[src]

Output a kebab-case name.

Trait Implementations

impl<'a> Default for NameTransform<'a>[src]

impl<'a> From<&'a str> for NameTransform<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for NameTransform<'a>

impl<'a> Send for NameTransform<'a>

impl<'a> Sync for NameTransform<'a>

impl<'a> Unpin for NameTransform<'a>

impl<'a> UnwindSafe for NameTransform<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any