pub struct LayoutNodeData {
pub source_trace: Rc<[SourceLocation]>,
pub modifier: Modifier,
pub resolved_modifiers: ResolvedModifiers,
pub modifier_slices: Rc<ModifierNodeSlices>,
pub semantics: Option<Rc<SemanticsConfiguration>>,
pub kind: LayoutNodeKind,
pub z_index: f32,
}Expand description
Snapshot of the data required to render a layout node.
Fields§
§source_trace: Rc<[SourceLocation]>Composable origins retained by an inspection-enabled layout node.
modifier: ModifierThe modifier of the node, kept where inspection is built in, which reads it.
resolved_modifiers: ResolvedModifiersPadding, layout properties and offset that the modifier chain resolved to.
modifier_slices: Rc<ModifierNodeSlices>Draw commands, pointer input handlers, text and graphics layer data collected from the modifier nodes.
semantics: Option<Rc<SemanticsConfiguration>>Semantics that the modifier chain reported, if any.
kind: LayoutNodeKindWhat kind of node this is.
z_index: f32Where the node draws among its siblings: its Modifier::z_index
plus the z index its parent placed it with.
Implementations§
Source§impl LayoutNodeData
impl LayoutNodeData
Sourcepub fn new(
resolved_modifiers: ResolvedModifiers,
modifier_slices: Rc<ModifierNodeSlices>,
semantics: Option<Rc<SemanticsConfiguration>>,
kind: LayoutNodeKind,
) -> Self
pub fn new( resolved_modifiers: ResolvedModifiers, modifier_slices: Rc<ModifierNodeSlices>, semantics: Option<Rc<SemanticsConfiguration>>, kind: LayoutNodeKind, ) -> Self
Creates node data from its parts.
Sourcepub fn refresh(&mut self, applier: &mut MemoryApplier, node_id: NodeId)
pub fn refresh(&mut self, applier: &mut MemoryApplier, node_id: NodeId)
Reads the resolved modifiers, the modifier slices and the semantics
again from node node_id of applier, and the modifier where
inspection is built in. Data of a node that is neither a layout node
nor a subcompose node stays as it was.
Sourcepub fn semantics(&self) -> Option<&SemanticsConfiguration>
pub fn semantics(&self) -> Option<&SemanticsConfiguration>
Semantics the node’s live modifier chain reported when the snapshot was taken.
Sourcepub fn resolved_modifiers(&self) -> ResolvedModifiers
pub fn resolved_modifiers(&self) -> ResolvedModifiers
Returns the padding, layout properties and offset that the modifier chain resolved to.
Sourcepub fn modifier_slices(&self) -> &ModifierNodeSlices
pub fn modifier_slices(&self) -> &ModifierNodeSlices
Returns the draw, pointer input, text and graphics layer data collected from the modifier nodes.
Trait Implementations§
Source§impl Clone for LayoutNodeData
impl Clone for LayoutNodeData
Auto Trait Implementations§
impl !RefUnwindSafe for LayoutNodeData
impl !Send for LayoutNodeData
impl !Sync for LayoutNodeData
impl !UnwindSafe for LayoutNodeData
impl Forget for LayoutNodeData
impl Freeze for LayoutNodeData
impl Move for LayoutNodeData
impl Unpin for LayoutNodeData
impl UnsafeUnpin for LayoutNodeData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more