iced_core::text

Type Alias Fragment

Source
pub type Fragment<'a> = Cow<'a, str>;
Expand description

A fragment of Text.

This is just an alias to a string that may be either borrowed or owned.

Aliased Type§

enum Fragment<'a> {
    Borrowed(&'a str),
    Owned(String),
}

Variants§

§1.0.0

Borrowed(&'a str)

Borrowed data.

§1.0.0

Owned(String)

Owned data.

Trait Implementations§

Source§

impl<'a, 'b> IntoFragment<'a> for &'a Fragment<'b>

Source§

fn into_fragment(self) -> Fragment<'a>

Converts the value to some text Fragment.
Source§

impl<'a> IntoFragment<'a> for Fragment<'a>

Source§

fn into_fragment(self) -> Fragment<'a>

Converts the value to some text Fragment.