Enum eyeball_im::VectorDiff
source · pub enum VectorDiff<T> {
Append {
values: Vector<T>,
},
Clear,
PushFront {
value: T,
},
PushBack {
value: T,
},
PopFront,
PopBack,
Insert {
index: usize,
value: T,
},
Set {
index: usize,
value: T,
},
Remove {
index: usize,
},
Truncate {
length: usize,
},
Reset {
values: Vector<T>,
},
}
Expand description
A change to an ObservableVector
.
Variants§
Append
Multiple elements were appended.
Clear
The vector was cleared.
PushFront
An element was added at the front.
Fields
value: T
The new element.
PushBack
An element was added at the back.
Fields
value: T
The new element.
PopFront
The element at the front was removed.
PopBack
The element at the back was removed.
Insert
An element was inserted at the given position.
Fields
index: usize
The index of the new element.
The element that was previously at that index as well as all the ones after it were shifted to the right.
value: T
The new element.
Set
A replacement of the previous value at the given position.
Remove
Removal of an element.
Truncate
Truncation of the vector.
Reset
The subscriber lagged too far behind, and the next update that should have been received has already been discarded from the internal buffer.
Implementations§
source§impl<T: Clone> VectorDiff<T>
impl<T: Clone> VectorDiff<T>
sourcepub fn map<U: Clone>(self, f: impl FnMut(T) -> U) -> VectorDiff<U>
pub fn map<U: Clone>(self, f: impl FnMut(T) -> U) -> VectorDiff<U>
Transform VectorDiff<T>
into VectorDiff<U>
by applying the given
function to any contained items.
Trait Implementations§
source§impl<T: Clone> Clone for VectorDiff<T>
impl<T: Clone> Clone for VectorDiff<T>
source§fn clone(&self) -> VectorDiff<T>
fn clone(&self) -> VectorDiff<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Debug> Debug for VectorDiff<T>
impl<T: Debug> Debug for VectorDiff<T>
source§impl<T: PartialEq> PartialEq for VectorDiff<T>
impl<T: PartialEq> PartialEq for VectorDiff<T>
source§fn eq(&self, other: &VectorDiff<T>) -> bool
fn eq(&self, other: &VectorDiff<T>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<T: Eq> Eq for VectorDiff<T>
impl<T> StructuralPartialEq for VectorDiff<T>
Auto Trait Implementations§
impl<T> Freeze for VectorDiff<T>where
T: Freeze,
impl<T> RefUnwindSafe for VectorDiff<T>where
T: RefUnwindSafe,
impl<T> Send for VectorDiff<T>
impl<T> Sync for VectorDiff<T>
impl<T> Unpin for VectorDiff<T>where
T: Unpin,
impl<T> UnwindSafe for VectorDiff<T>where
T: UnwindSafe + RefUnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)