pub struct LayoutNode {
pub id: NodeId,
pub origin: Point,
pub bounds: Rect,
pub primary_source: Option<SourceRange>,
pub style: Style,
pub kind: LayoutNodeKind,
}Expand description
A positioned renderable or grouping node.
Fields§
§id: NodeIdStable node identifier within the fragment.
origin: PointPosition of the node origin in fragment coordinates.
bounds: RectBounding rectangle in fragment coordinates.
primary_source: Option<SourceRange>Primary source range when the node has one direct origin.
style: StyleVisual style applied to this node.
kind: LayoutNodeKindContent payload of this node.
Implementations§
Source§impl LayoutNode
impl LayoutNode
Sourcepub fn baseline_y(&self) -> Option<Length>
pub fn baseline_y(&self) -> Option<Length>
Returns the baseline y coordinate; boxes use origin.y + height, glyph runs use origin.y.
Trait Implementations§
Source§impl Clone for LayoutNode
impl Clone for LayoutNode
Source§fn clone(&self) -> LayoutNode
fn clone(&self) -> LayoutNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutNode
impl Debug for LayoutNode
Source§impl PartialEq for LayoutNode
impl PartialEq for LayoutNode
Source§fn eq(&self, other: &LayoutNode) -> bool
fn eq(&self, other: &LayoutNode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LayoutNode
Auto Trait Implementations§
impl Freeze for LayoutNode
impl RefUnwindSafe for LayoutNode
impl Send for LayoutNode
impl Sync for LayoutNode
impl Unpin for LayoutNode
impl UnsafeUnpin for LayoutNode
impl UnwindSafe for LayoutNode
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