pub struct CachedVals(pub SmallVec<[Option<Value>; 4]>);
Tuple Fields§
§0: SmallVec<[Option<Value>; 4]>
Implementations§
Source§impl CachedVals
impl CachedVals
pub fn new<C: Ctx, E: UserEvent>(from: &[Node<C, E>]) -> CachedVals
pub fn update<C: Ctx, E: UserEvent>( &mut self, ctx: &mut ExecCtx<C, E>, from: &mut [Node<C, E>], event: &mut Event<E>, ) -> bool
Sourcepub fn update_diff<C: Ctx, E: UserEvent>(
&mut self,
ctx: &mut ExecCtx<C, E>,
from: &mut [Node<C, E>],
event: &mut Event<E>,
) -> SmallVec<[bool; 4]>
pub fn update_diff<C: Ctx, E: UserEvent>( &mut self, ctx: &mut ExecCtx<C, E>, from: &mut [Node<C, E>], event: &mut Event<E>, ) -> SmallVec<[bool; 4]>
Like update, but return the indexes of the nodes that updated instead of a consolidated bool
Sourcepub fn update_changed<C: Ctx, E: UserEvent>(
&mut self,
ctx: &mut ExecCtx<C, E>,
from: &mut [Node<C, E>],
event: &mut Event<E>,
) -> SmallVec<[bool; 4]>
pub fn update_changed<C: Ctx, E: UserEvent>( &mut self, ctx: &mut ExecCtx<C, E>, from: &mut [Node<C, E>], event: &mut Event<E>, ) -> SmallVec<[bool; 4]>
Only update if the value changes, return the indexes of nodes that updated
pub fn flat_iter<'a>(&'a self) -> impl Iterator<Item = Option<Value>> + 'a
Auto Trait Implementations§
impl Freeze for CachedVals
impl RefUnwindSafe for CachedVals
impl Send for CachedVals
impl Sync for CachedVals
impl Unpin for CachedVals
impl UnwindSafe for CachedVals
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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