pub struct TextRunCache { /* private fields */ }Expand description
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.
Implementations§
Source§impl TextRunCache
impl TextRunCache
pub fn new() -> Self
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidates all cached entries and disposes their shaped buffers.
Sourcepub fn invalidate_from(&self, text_source_index: i32)
pub fn invalidate_from(&self, text_source_index: i32)
Invalidates all cached entries at or after the specified text source index.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TextRunCache
impl !RefUnwindSafe for TextRunCache
impl !Send for TextRunCache
impl !Sync for TextRunCache
impl !UnwindSafe for TextRunCache
impl Unpin for TextRunCache
impl UnsafeUnpin for TextRunCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more