Stringable

Trait Stringable 

Source
pub trait Stringable {
    // Required method
    fn to_shared_string(&self) -> SharedString;
}
Expand description

A type that can be converted into a SharedString.

This is a blanket trait used to generically support converting any type which already supports conversion to String into a SharedString. This is purely used by the static_metrics! macro to allow for ergonomic handling of labels, and should generally not need to be implemented manually.

Required Methods§

Source

fn to_shared_string(&self) -> SharedString

Converts the given value to a SharedString.

Implementors§

Source§

impl<T> Stringable for T
where T: Display,