[−][src]Struct zamm_yang::codegen::NameTransform
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]
fn default() -> NameTransform<'a>
[src]
impl<'a> From<&'a str> for NameTransform<'a>
[src]
fn from(name: &'a str) -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,