pub struct KeyedEntry<K: 'static, T: 'static> { /* private fields */ }Expand description
A non-owning entity handle; field aliases belong to their constructing Owner.
Implementations§
Source§impl<K, T> KeyedEntry<K, T>
impl<K, T> KeyedEntry<K, T>
pub fn key(&self) -> &K
pub fn id(&self) -> u64
pub fn try_with_untracked<R>( &self, read: impl FnOnce(&T) -> R, ) -> Result<R, AccessError>
pub fn update<R>( &self, edit: impl FnOnce(&mut T) -> R, ) -> Result<R, AccessError>
pub fn field<U: 'static>( &self, name: impl Into<Cow<'static, str>>, get: impl for<'a> Fn(&'a T) -> &'a U + 'static, get_mut: impl for<'a> Fn(&'a mut T) -> &'a mut U + 'static, ) -> Cage<U>
pub fn try_field<U: 'static>( &self, name: impl Into<Cow<'static, str>>, get: impl for<'a> Fn(&'a T) -> &'a U + 'static, get_mut: impl for<'a> Fn(&'a mut T) -> &'a mut U + 'static, ) -> Result<Cage<U>, AccessError>
Trait Implementations§
Auto Trait Implementations§
impl<K, T> !Send for KeyedEntry<K, T>
impl<K, T> !Sync for KeyedEntry<K, T>
impl<K, T> Freeze for KeyedEntry<K, T>
impl<K, T> RefUnwindSafe for KeyedEntry<K, T>
impl<K, T> Unpin for KeyedEntry<K, T>
impl<K, T> UnsafeUnpin for KeyedEntry<K, T>
impl<K, T> UnwindSafe for KeyedEntry<K, T>
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