heck

Trait ToShoutyKebabCase

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

This trait defines a shouty kebab case conversion.

In SHOUTY-KEBAB-CASE, word boundaries are indicated by hyphens and all words are in uppercase.

§Example:

use heck::ToShoutyKebabCase;

let sentence = "We are going to inherit the earth.";
assert_eq!(sentence.to_shouty_kebab_case(), "WE-ARE-GOING-TO-INHERIT-THE-EARTH");

Required Methods§

Source

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

Convert this type to shouty kebab 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 ToShoutyKebabCase for str

Implementors§