i_slint_core::string

Trait ToSharedString

Source
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§

Source

fn to_shared_string(&self) -> SharedString

Converts the given value to a SharedString.

Implementors§

Source§

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