FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FormattedTextSource

    struct · ferroui-base · v0.5.0

    struct FormattedTextSource
    

    The text source of a formatted text: one string with default properties and optional property overrides for ranges of it.

    View source

    Members

    new

    fn new(text: ReadOnlyMemory<u16>, default_properties: Rc<dyn TextRunProperties>, text_modifier: Option<Rc<[ValueSpan<Rc<dyn TextRunProperties>>]>>) -> Self
    

    Source

    create_text_style_run

    fn create_text_style_run(text: &[u16], first_text_source_index: i32, default_properties: &Rc<dyn TextRunProperties>, text_modifier: Option<&[ValueSpan<Rc<dyn TextRunProperties>>]>) -> ValueSpan<Rc<dyn TextRunProperties>>
    

    Creates a span of text run properties that has modifier applied.

    • text — the text to create the properties for.
    • first_text_source_index — the first text source index.
    • default_properties — the default text properties.
    • text_modifier — the text properties modifier.

    Returns the created text style run.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • ITextSource

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.