syntax

Trait ToSmolStr

pub trait ToSmolStr {
    // Required method
    fn to_smolstr(&self) -> SmolStr;
}
Expand description

Convert value to SmolStr using fmt::Display, potentially without allocating.

Almost identical to ToString, but converts to SmolStr instead.

Required Methods§

fn to_smolstr(&self) -> SmolStr

Implementors§

§

impl<T> ToSmolStr for T
where T: Display + ?Sized,