pub struct DiffNode {
pub type_id: TypeId,
pub key: Option<String>,
pub props_hash: u64,
pub children: Vec<Self>,
pub index: usize,
}Expand description
A node in the widget tree for diffing.
Fields§
§type_id: TypeIdWidget type
key: Option<String>Optional key for matching
props_hash: u64Widget properties hash (for detecting changes)
children: Vec<Self>Child nodes
index: usizePosition in parent’s children list
Implementations§
Source§impl DiffNode
impl DiffNode
Sourcepub const fn with_index(self, index: usize) -> Self
pub const fn with_index(self, index: usize) -> Self
Set the index of this node.
Sourcepub fn with_child(self, child: Self) -> Self
pub fn with_child(self, child: Self) -> Self
Add a child node with fluent API.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiffNode
impl RefUnwindSafe for DiffNode
impl Send for DiffNode
impl Sync for DiffNode
impl Unpin for DiffNode
impl UnwindSafe for DiffNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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