Trait ToStringWith

Source
pub trait ToStringWith<How> {
    // Required method
    fn to_string_with<'s>(&'s self) -> Cow<'s, str>;
}
Expand description

Trait to convert a type to a string using a specified formatting method.

Required Methods§

Source

fn to_string_with<'s>(&'s self) -> Cow<'s, str>

Converts the type to a string using the specified formatting method.

Implementors§

Source§

impl<'a, T> ToStringWith<WithDebug> for T
where T: Debug + ?Sized,

Source§

impl<'a, T> ToStringWith<WithDebugMultiline> for T
where T: Debug + ?Sized,

Source§

impl<'a, T> ToStringWith<WithDisplay> for T
where T: 'a + Display + ?Sized,

Source§

impl<'a, T> ToStringWith<WithRef> for T
where T: 'a + AsRef<str> + ?Sized,