pub struct TextPrimitiveNode {
pub node_id: NodeId,
pub rect: Rect,
pub text: Rc<AnnotatedString>,
pub render_text: Arc<RenderString>,
pub text_style: Arc<TextStyle>,
pub font_size: f32,
pub layout_options: TextLayoutOptions,
pub clip: Option<Rect>,
}Fields§
§node_id: NodeId§rect: Rect§text: Rc<AnnotatedString>Shared so the renderer can hand the same allocation to every draw it emits for this node instead of deep-copying the string once per emit.
render_text: Arc<RenderString>text as the renderer’s draws carry it across threads, shared with
the prepared layout it came from so no frame converts it again.
text_style: Arc<TextStyle>Shared so every frame’s draws of this text hand over the same style instead of copying it.
font_size: f32§layout_options: TextLayoutOptions§clip: Option<Rect>Trait Implementations§
Source§impl Clone for TextPrimitiveNode
impl Clone for TextPrimitiveNode
Source§impl Debug for TextPrimitiveNode
impl Debug for TextPrimitiveNode
Source§impl PartialEq for TextPrimitiveNode
impl PartialEq for TextPrimitiveNode
impl StructuralPartialEq for TextPrimitiveNode
Auto Trait Implementations§
impl !RefUnwindSafe for TextPrimitiveNode
impl !Send for TextPrimitiveNode
impl !Sync for TextPrimitiveNode
impl !UnwindSafe for TextPrimitiveNode
impl Freeze for TextPrimitiveNode
impl Unpin for TextPrimitiveNode
impl UnsafeUnpin for TextPrimitiveNode
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