pub enum VirtualKey {
Index(usize),
Named(String),
}Expand description
Stable identity key for a virtual item.
Supports both numeric and string-based keys to allow custom key extractors that produce stable identities across item reordering. When items are reordered, their measured sizes follow the key rather than the index.
Variants§
Index(usize)
A numeric key, typically derived from the item index.
Named(String)
A string-based key for custom identity strategies.
Trait Implementations§
Source§impl Clone for VirtualKey
impl Clone for VirtualKey
Source§fn clone(&self) -> VirtualKey
fn clone(&self) -> VirtualKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VirtualKey
impl Debug for VirtualKey
Source§impl Default for VirtualKey
impl Default for VirtualKey
Source§impl Display for VirtualKey
impl Display for VirtualKey
Source§impl From<&str> for VirtualKey
impl From<&str> for VirtualKey
Source§impl From<String> for VirtualKey
impl From<String> for VirtualKey
Source§impl From<usize> for VirtualKey
impl From<usize> for VirtualKey
Source§impl Hash for VirtualKey
impl Hash for VirtualKey
Source§impl PartialEq for VirtualKey
impl PartialEq for VirtualKey
impl Eq for VirtualKey
impl StructuralPartialEq for VirtualKey
Auto Trait Implementations§
impl Freeze for VirtualKey
impl RefUnwindSafe for VirtualKey
impl Send for VirtualKey
impl Sync for VirtualKey
impl Unpin for VirtualKey
impl UnsafeUnpin for VirtualKey
impl UnwindSafe for VirtualKey
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