pub struct KeyedList<K: 'static, T: 'static> { /* private fields */ }Expand description
Owner-owned, thread-local collection of authoritative values and stable keys. Keys must be pure and fixed for a member’s lifetime. Editing its key field does not rename a member; use remove/insert to establish a new identity.
Implementations§
Source§impl<K: Clone + Eq + Hash + 'static, T: 'static> KeyedList<K, T>
impl<K: Clone + Eq + Hash + 'static, T: 'static> KeyedList<K, T>
pub fn runtime(self) -> RuntimeId
pub fn is_alive(self) -> bool
pub fn len_untracked(self) -> usize
Sourcepub fn storage_slots_untracked(self) -> usize
pub fn storage_slots_untracked(self) -> usize
Allocated value slots follow peak concurrent membership, not visited keys.
pub fn with_order<R>(self, read: impl FnOnce(&[RowToken<K>]) -> R) -> R
pub fn try_with_order<R>( self, read: impl FnOnce(&[RowToken<K>]) -> R, ) -> Result<R, AccessError>
pub fn entry(self, token: &RowToken<K>) -> Result<KeyedEntry<K, T>, AccessError>
pub fn at(self, index: usize) -> Result<KeyedEntry<K, T>, AccessError>
pub fn update_at<R>( self, index: usize, edit: impl FnOnce(&mut T) -> R, ) -> Result<R, AccessError>
pub fn find(self, key: &K) -> Result<Option<KeyedEntry<K, T>>, AccessError>
pub fn update_key<R>( self, key: &K, edit: impl FnOnce(&mut T) -> R, ) -> Result<R, AccessError>
pub fn replace(self, values: Vec<T>) -> Result<(), ListError>
pub fn extend(self, values: Vec<T>) -> Result<(), ListError>
pub fn swap(self, a: usize, b: usize) -> Result<(), AccessError>
pub fn remove_key(self, key: &K) -> Result<Option<T>, AccessError>
pub fn clear(self) -> Result<(), AccessError>
Trait Implementations§
Auto Trait Implementations§
impl<K, T> !RefUnwindSafe for KeyedList<K, T>
impl<K, T> !Send for KeyedList<K, T>
impl<K, T> !Sync for KeyedList<K, T>
impl<K, T> !UnwindSafe for KeyedList<K, T>
impl<K, T> Forget for KeyedList<K, T>
impl<K, T> Freeze for KeyedList<K, T>
impl<K, T> Unpin for KeyedList<K, T>
impl<K, T> UnsafeUnpin for KeyedList<K, T>where
Cage<Meta<K, T>>: UnsafeUnpin,
Cage<Vec<RowToken<K>>>: UnsafeUnpin,
Cage<Arena<T>>: UnsafeUnpin,
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