pub struct NodeChangeSet {
pub bits: u32,
}Expand description
Bit flags describing what changed about a node between old and new DOM. Multiple flags can be set simultaneously. Uses manual bit manipulation instead of bitflags crate to avoid adding a dependency.
Fields§
§bits: u32Implementations§
Source§impl NodeChangeSet
impl NodeChangeSet
Sourcepub const NODE_TYPE_CHANGED: u32 = 0b0000_0000_0000_0001
pub const NODE_TYPE_CHANGED: u32 = 0b0000_0000_0000_0001
Node type changed entirely (e.g., Text → Image).
Sourcepub const TEXT_CONTENT: u32 = 0b0000_0000_0000_0010
pub const TEXT_CONTENT: u32 = 0b0000_0000_0000_0010
Text content changed (for Text nodes).
Sourcepub const IDS_AND_CLASSES: u32 = 0b0000_0000_0000_0100
pub const IDS_AND_CLASSES: u32 = 0b0000_0000_0000_0100
CSS IDs or classes changed (may cause restyle → relayout).
Sourcepub const INLINE_STYLE_LAYOUT: u32 = 0b0000_0000_0000_1000
pub const INLINE_STYLE_LAYOUT: u32 = 0b0000_0000_0000_1000
Inline CSS properties changed that affect layout.
Sourcepub const CHILDREN_CHANGED: u32 = 0b0000_0000_0001_0000
pub const CHILDREN_CHANGED: u32 = 0b0000_0000_0001_0000
Children added, removed, or reordered.
Sourcepub const IMAGE_CHANGED: u32 = 0b0000_0000_0010_0000
pub const IMAGE_CHANGED: u32 = 0b0000_0000_0010_0000
Image source changed (may affect intrinsic size).
Sourcepub const CONTENTEDITABLE: u32 = 0b0000_0000_0100_0000
pub const CONTENTEDITABLE: u32 = 0b0000_0000_0100_0000
Contenteditable flag changed.
Sourcepub const INLINE_STYLE_PAINT: u32 = 0b0000_0001_0000_0000
pub const INLINE_STYLE_PAINT: u32 = 0b0000_0001_0000_0000
Inline CSS properties changed that affect paint only.
Sourcepub const STYLED_STATE: u32 = 0b0000_0010_0000_0000
pub const STYLED_STATE: u32 = 0b0000_0010_0000_0000
Styled node state changed (hover, active, focus, etc.).
Sourcepub const CALLBACKS: u32 = 0b0000_0100_0000_0000
pub const CALLBACKS: u32 = 0b0000_0100_0000_0000
Callbacks changed (new RefAny, different event handlers).
Sourcepub const ACCESSIBILITY: u32 = 0b0001_0000_0000_0000
pub const ACCESSIBILITY: u32 = 0b0001_0000_0000_0000
Accessibility info changed.
Sourcepub const AFFECTS_LAYOUT: u32
pub const AFFECTS_LAYOUT: u32
Any change that requires a layout pass.
Sourcepub const AFFECTS_PAINT: u32
pub const AFFECTS_PAINT: u32
Any change that requires a paint/display-list update (but not layout).
pub const fn empty() -> Self
pub const fn is_empty(&self) -> bool
pub const fn contains(&self, flag: u32) -> bool
pub const fn intersects(&self, mask: u32) -> bool
pub fn insert(&mut self, flag: u32)
Sourcepub const fn is_visually_unchanged(&self) -> bool
pub const fn is_visually_unchanged(&self) -> bool
Returns true if no visual change occurred (only callbacks/dataset/a11y).
Sourcepub const fn needs_layout(&self) -> bool
pub const fn needs_layout(&self) -> bool
Returns true if layout is needed.
Sourcepub const fn needs_paint(&self) -> bool
pub const fn needs_paint(&self) -> bool
Returns true if paint is needed (but not necessarily layout).
Trait Implementations§
Source§impl BitOr for NodeChangeSet
impl BitOr for NodeChangeSet
Source§impl BitOrAssign for NodeChangeSet
impl BitOrAssign for NodeChangeSet
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl Clone for NodeChangeSet
impl Clone for NodeChangeSet
Source§fn clone(&self) -> NodeChangeSet
fn clone(&self) -> NodeChangeSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeChangeSet
impl Debug for NodeChangeSet
Source§impl Default for NodeChangeSet
impl Default for NodeChangeSet
Source§fn default() -> NodeChangeSet
fn default() -> NodeChangeSet
Source§impl PartialEq for NodeChangeSet
impl PartialEq for NodeChangeSet
Source§fn eq(&self, other: &NodeChangeSet) -> bool
fn eq(&self, other: &NodeChangeSet) -> bool
self and other values to be equal, and is used by ==.