pub enum Key {
Static(&'static str),
U64(u64),
String(String),
}Expand description
Identity key for a declarative child within one parent.
Variants with equal displayed text remain distinct (Static("1") is not
String("1")). Keys need only be unique among siblings; reconciliation
combines them with tree structure rather than treating them as global IDs.
§Examples
use ailloli_ui_runtime::element::Key;
assert_ne!(Key::Static("7"), Key::String("7".into()));
assert_eq!(Key::U64(7), Key::U64(7));Variants§
Static(&'static str)
Borrowed program-static identifier with no allocation.
U64(u64)
Numeric identifier.
String(String)
Owned dynamic UTF-8 identifier; empty strings are valid.
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.