pub struct ValueRow<K, T: 'static> {
pub value: Cage<T>,
pub index: Cage<usize>,
/* private fields */
}Expand description
Reactive vector row. Both handles belong to the row’s data Owner.
Fields§
§value: Cage<T>§index: Cage<usize>Implementations§
Source§impl<K, T> ValueRow<K, T>
impl<K, T> ValueRow<K, T>
pub fn key(&self) -> &K
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>
Trait Implementations§
Auto Trait Implementations§
impl<K, T> !Send for ValueRow<K, T>
impl<K, T> !Sync for ValueRow<K, T>
impl<K, T> Forget for ValueRow<K, T>
impl<K, T> Freeze for ValueRow<K, T>
impl<K, T> Move for ValueRow<K, T>
impl<K, T> RefUnwindSafe for ValueRow<K, T>
impl<K, T> Unpin for ValueRow<K, T>
impl<K, T> UnsafeUnpin for ValueRow<K, T>
impl<K, T> UnwindSafe for ValueRow<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