slint

Trait ToSharedString

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

A trait for converting a value to a SharedString.

This trait is automatically implemented for any type which implements the Display trait as long as the trait is in scope. As such, ToSharedString shouldn’t be implemented directly: Display should be implemented instead, and you get the ToSharedString implementation for free.

Required Methods§

fn to_shared_string(&self) -> SharedString

Converts the given value to a SharedString.

Implementors§

§

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