Trait druid::text::TextStorage[][src]

pub trait TextStorage: PietTextStorage + Data {
    fn add_attributes(
        &self,
        builder: PietTextLayoutBuilder,
        env: &Env
    ) -> PietTextLayoutBuilder { ... }
fn links(&self) -> &[Link]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... } }
Expand description

A type that represents text that can be displayed.

Provided methods

If this TextStorage object manages style spans, it should implement this method and update the provided builder with its spans, as required.

Examples found in repository
druid/examples/text.rs (line 54)
53
54
55
fn add_attributes(&self, builder: PietTextLayoutBuilder, env: &Env) -> PietTextLayoutBuilder {
        self.text.add_attributes(builder, env)
    }

Any additional Link attributes on this text.

If this TextStorage object manages link attributes, it should implement this method and return any attached Links.

Unlike other attributes, links are managed in Druid, not in piet; as such they require a separate API.

Implementations on Foreign Types

Implementors