Skip to main content

NodeData

Struct NodeData 

Source
pub struct NodeData<H> {
Show 16 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 a11y: A11yProps, pub cache: Vec<((u64, u64), Size)>, pub probe: NodeProbe, pub needs_measure: bool, pub last_native_frame: Option<Rect>, pub is_boundary: bool, pub scroll_content: Option<Size>, pub implicit_anim: Option<AnimSpec>,
}

Fields§

§kind: PieceKind§handle: Option<H>§parent: RNode§children: Vec<RNode>§layout: Rc<dyn Layout>§flex: Flex§scope: Scope§id: Option<String>§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)>§probe: NodeProbe§needs_measure: bool§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.

Auto Trait Implementations§

§

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

§

impl<H> !RefUnwindSafe for NodeData<H>

§

impl<H> !Send for NodeData<H>

§

impl<H> !Sync for NodeData<H>

§

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

§

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

§

impl<H> !UnwindSafe for NodeData<H>

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

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

Day API ↩ Guides· daybrite.dev