pub struct ChildKey(/* private fields */);Expand description
A stable identity for a list child, so a container’s reconciliation can match a child to its live widget by key across reorders/inserts instead of by position — the difference between “the third row’s widget” and “row #42’s widget” when the list is shuffled.
Built from any Hash value (an item id, a string name, an index) via the
From impls below and keyed; the hashed u64 is what the
reconciler compares. Two children in the same list must not collide — a
duplicate key is a debug_assert tripwire that falls back to positional
reconciliation (see authoring::rebuild_children).
Implementations§
Trait Implementations§
impl Copy for ChildKey
impl Eq for ChildKey
impl StructuralPartialEq for ChildKey
Auto Trait Implementations§
impl Freeze for ChildKey
impl RefUnwindSafe for ChildKey
impl Send for ChildKey
impl Sync for ChildKey
impl Unpin for ChildKey
impl UnsafeUnpin for ChildKey
impl UnwindSafe for ChildKey
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.