pub struct VecObserverState<O> { /* private fields */ }Expand description
Observer state for dynamically-sized slices (Vec<T>, Box<[T]>), tracking
Append and Truncate boundaries.
The append_index divides the observed slice into two regions: elements before it are
“existing” (may have individual observer state), and elements from append_index onward are
“appended” (new since the last flush).
§Replace Semantics
During flush, if all existing elements’ inner observers
report Replace and there was at least some tracked content
(append_index > 0 or truncate_len > 0), the granular mutations are collapsed into a single
whole-slice Replace.
Trait Implementations§
Source§impl<O> ObserverState for VecObserverState<O>
impl<O> ObserverState for VecObserverState<O>
Source§impl<O> SliceObserverState for VecObserverState<O>
impl<O> SliceObserverState for VecObserverState<O>
Source§impl<O, S, D> SliceSerializeObserverState<S, D> for VecObserverState<O>where
D: Unsigned,
S: AsDerefMut<D, Target = [O::Head]> + ?Sized,
O: Observer<InnerDepth = Zero> + SerializeObserver,
O::Head: Serialize + Sized + 'static,
impl<O, S, D> SliceSerializeObserverState<S, D> for VecObserverState<O>where
D: Unsigned,
S: AsDerefMut<D, Target = [O::Head]> + ?Sized,
O: Observer<InnerDepth = Zero> + SerializeObserver,
O::Head: Serialize + Sized + 'static,
Auto Trait Implementations§
impl<O> !Freeze for VecObserverState<O>
impl<O> !RefUnwindSafe for VecObserverState<O>
impl<O> Send for VecObserverState<O>where
O: Send,
impl<O> !Sync for VecObserverState<O>
impl<O> Unpin for VecObserverState<O>where
O: Unpin,
impl<O> UnsafeUnpin for VecObserverState<O>
impl<O> UnwindSafe for VecObserverState<O>where
O: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
Source§impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut(&mut self) -> &mut T
fn as_deref_mut(&mut self) -> &mut T
Mutably dereferences self
N times.Source§impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut_coinductive(&mut self) -> &mut T
fn as_deref_mut_coinductive(&mut self) -> &mut T
Mutably dereferences self
N times.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