Enum VecEffect
pub enum VecEffect<'a, T> {
Insert(usize, &'a [T]),
Update(usize, &'a T, &'a T),
Remove(usize, usize, &'a [T]),
}Expand description
A primitive operation that will be performed on a Vec<T> as a result of a
higher level and more optimized VecMutation.
Variants§
Insert(usize, &'a [T])
The given NEW items will be inserted at the given index.
Means the length of the list will INCREASE by the length of items.
Update(usize, &'a T, &'a T)
The EXISTING item at the given index will be replaced with a new value.
First sample is the previous value, second sample is the new value.
Means the length of the list will STAY THE SAME.
Remove(usize, usize, &'a [T])
The specified range of EXISTING items will be removed.
The sample at the end is the slice of items that will be removed.
Means the length of the list will DECREASE by end - start.
Trait Implementations§
impl<'a, T> Copy for VecEffect<'a, T>where
T: Copy,
impl<'a, T> StructuralPartialEq for VecEffect<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for VecEffect<'a, T>
impl<'a, T> RefUnwindSafe for VecEffect<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for VecEffect<'a, T>where
T: Sync,
impl<'a, T> Sync for VecEffect<'a, T>where
T: Sync,
impl<'a, T> Unpin for VecEffect<'a, T>
impl<'a, T> UnwindSafe for VecEffect<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.