pub struct AsKebabCase<T: AsRef<str>>(pub T);
Expand description
This wrapper performs a kebab case conversion in fmt::Display
.
§Example:
use heck::AsKebabCase;
let sentence = "We are going to inherit the earth.";
assert_eq!(format!("{}", AsKebabCase(sentence)), "we-are-going-to-inherit-the-earth");
Tuple Fields§
§0: T
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AsKebabCase<T>where
T: Freeze,
impl<T> RefUnwindSafe for AsKebabCase<T>where
T: RefUnwindSafe,
impl<T> Send for AsKebabCase<T>where
T: Send,
impl<T> Sync for AsKebabCase<T>where
T: Sync,
impl<T> Unpin for AsKebabCase<T>where
T: Unpin,
impl<T> UnwindSafe for AsKebabCase<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more