heck

Trait ToUpperCamelCase

Source
pub trait ToUpperCamelCase: ToOwned {
    // Required method
    fn to_upper_camel_case(&self) -> Self::Owned;
}
Expand description

This trait defines an upper camel case conversion.

In UpperCamelCase, word boundaries are indicated by capital letters, including the first word.

§Example:

use heck::ToUpperCamelCase;

let sentence = "We are not in the least afraid of ruins.";
assert_eq!(sentence.to_upper_camel_case(), "WeAreNotInTheLeastAfraidOfRuins");

Required Methods§

Source

fn to_upper_camel_case(&self) -> Self::Owned

Convert this type to upper camel case.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToUpperCamelCase for str

Implementors§