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.
Members
new
fn new() -> Self
invalidate
fn invalidate(self: &Self)
Invalidates all cached entries and disposes their shaped buffers.
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.
invalidate_from
fn invalidate_from(self: &Self, text_source_index: i32)
Invalidates all cached entries at or after the specified text source index.
dispose
fn dispose(self: &Self)
Releases the cache.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.