FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextRunCache

    struct · ferroui-base · v0.5.0

    struct TextRunCache
    

    Caches shaped text runs and bidi processing results to avoid redundant shaping when only the paragraph width constraint changes (e.g., between Measure and Arrange).

    Uses an inline single-entry store for the common case of a single paragraph, and only promotes to a dictionary when multiple entries are added.

    This API is in preview and subject to change without deprecation.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    invalidate

    fn invalidate(self: &Self)
    

    Invalidates all cached entries and disposes their shaped buffers.

    Source

    retire

    fn retire(self: &Self)
    

    Invalidates the cached entries for a new text of the owner, as invalidate does, and keeps the shapings of long texts of the text before for the new one: an edit of a long text shapes again only what the edit changed.

    Source

    invalidate_from

    fn invalidate_from(self: &Self, text_source_index: i32)
    

    Invalidates all cached entries at or after the specified text source index.

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the cache.

    Source

    Trait implementations

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

    Availability

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