Struct heck::AsTrainCase
source · pub struct AsTrainCase<T: AsRef<str>>(pub T);
Expand description
This wrapper performs a train case conversion in fmt::Display
.
Example:
use heck::AsTrainCase;
let sentence = "We are going to inherit the earth.";
assert_eq!(format!("{}", AsTrainCase(sentence)), "We-Are-Going-To-Inherit-The-Earth");
Tuple Fields§
§0: T
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for AsTrainCase<T>where T: RefUnwindSafe,
impl<T> Send for AsTrainCase<T>where T: Send,
impl<T> Sync for AsTrainCase<T>where T: Sync,
impl<T> Unpin for AsTrainCase<T>where T: Unpin,
impl<T> UnwindSafe for AsTrainCase<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