Skip to main content

NodeData

Struct NodeData 

Source
pub struct NodeData<H> {
Show 20 fields pub kind: PieceKind, pub handle: Option<H>, pub parent: RNode, pub children: Vec<RNode>, pub layout: Rc<dyn Layout>, pub flex: Flex, pub scope: Scope, pub id: Option<String>, pub parked_id: Option<String>, pub a11y: A11yProps, pub cache: Vec<((u64, u64), Size)>, pub baseline_cache: Option<((u64, u64), Option<f64>)>, pub probe: NodeProbe, pub needs_measure: bool, pub needs_layout: bool, pub last_native_frame: Option<Rect>, pub is_boundary: bool, pub scroll_content: Option<Size>, pub implicit_anim: Option<AnimSpec>, pub tweaked: bool,
}

Fields§

§kind: PieceKind§handle: Option<H>§parent: RNode§children: Vec<RNode>§layout: Rc<dyn Layout>§flex: Flex§scope: Scope§id: Option<String>§parked_id: Option<String>

The id a recycled cell’s node carried before subtree recycling parked it (docs/list.md). A pooled row must stop answering lookups while it is hidden, but its next bind may show the same row content again (a slot write of an unchanged value, which fires no reactive id_of and re-runs no static .id()), so the parked id is what restore_subtree_ids hands back on rebind.

§a11y: A11yProps

Accumulated accessibility annotations (§13): merged from the piece default, .a11y(), and .id(). Stored so each set_a11y re-applies the full picture and a11y_audit (§14.2) can diff the native tree against Day’s own expectation.

§cache: Vec<((u64, u64), Size)>§baseline_cache: Option<((u64, u64), Option<f64>)>

The last (size, first baseline) this node answered (docs/baseline.md). One slot, not a list: a baseline is asked for at the size the row already settled on, so the query repeats at one size per pass. Invalidated with needs_measure, alongside cache.

§probe: NodeProbe§needs_measure: bool§needs_layout: bool

Placement dirt reaches the root even through measure boundaries. Recycled cell subtrees are detached from the window tree, so their sweep must see this bit.

§last_native_frame: Option<Rect>§is_boundary: bool§scroll_content: Option<Size>

Scroll-content size reported by ScrollLayout (§7.6); scroll nodes only. Cached so scroll_to_target can compose edge targets (bottom = content minus viewport).

§implicit_anim: Option<AnimSpec>

Node-scoped implicit animation (.animation(anim), §8.4): when set, this node’s property patches and frame changes animate even outside a with_animation. The ambient animation (with_animation) takes precedence when both are present.

§tweaked: bool

A .tweak closure (or a per-toolkit ext modifier, which routes through it) ran against this node’s handle (docs/tweaks.md). Read by set_node_selectable: a backing swap would discard that work, which warrants a loud warning rather than silent loss.

Auto Trait Implementations§

§

impl<H> !RefUnwindSafe for NodeData<H>

§

impl<H> !Send for NodeData<H>

§

impl<H> !Sync for NodeData<H>

§

impl<H> !UnwindSafe for NodeData<H>

§

impl<H> Freeze for NodeData<H>
where Option<H>: Freeze,

§

impl<H> Unpin for NodeData<H>
where Option<H>: Unpin,

§

impl<H> UnsafeUnpin for NodeData<H>
where Option<H>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.