pub struct TextPaintCache(/* private fields */);Expand description
A text node’s TextPaint, set when the scene builds the node or when a
renderer first asks for it. It is derived data, so two caches always
compare equal.
Implementations§
Source§impl TextPaintCache
impl TextPaintCache
Sourcepub fn of_text(
style: &TextStyle,
style_hash: u64,
spans: &[RangeStyle<SpanStyle>],
text: (f32, &TextLayout),
) -> Self
pub fn of_text( style: &TextStyle, style_hash: u64, spans: &[RangeStyle<SpanStyle>], text: (f32, &TextLayout), ) -> Self
A cache holding the paint of a text in style, whose
TextStyle::render_hash is style_hash, with spans, at
font_size, laid out as layout: shared with the other texts the
thread made in that style when the text has no spans.
Trait Implementations§
Source§impl Clone for TextPaintCache
impl Clone for TextPaintCache
Source§impl Debug for TextPaintCache
impl Debug for TextPaintCache
Source§impl Default for TextPaintCache
impl Default for TextPaintCache
Auto Trait Implementations§
impl !Freeze for TextPaintCache
impl !RefUnwindSafe for TextPaintCache
impl !Sync for TextPaintCache
impl Forget for TextPaintCache
impl Move for TextPaintCache
impl Send for TextPaintCache
impl Unpin for TextPaintCache
impl UnsafeUnpin for TextPaintCache
impl UnwindSafe for TextPaintCache
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