pub struct Splice<T> {
pub at: usize,
pub remove: usize,
pub insert: Vec<T>,
}Expand description
One edit: drop remove items starting at at, then put insert in their
place.
A pure insertion has remove == 0, a pure deletion has an empty insert,
and at counts positions in the old sequence.
Fields§
§at: usizeWhere the edit starts, as an index into the old sequence.
remove: usizeHow many old items the edit drops.
insert: Vec<T>The items to put in their place.
Trait Implementations§
impl<T: Eq> Eq for Splice<T>
impl<T: PartialEq> StructuralPartialEq for Splice<T>
Auto Trait Implementations§
impl<T> Freeze for Splice<T>
impl<T> RefUnwindSafe for Splice<T>where
T: RefUnwindSafe,
impl<T> Send for Splice<T>where
T: Send,
impl<T> Sync for Splice<T>where
T: Sync,
impl<T> Unpin for Splice<T>where
T: Unpin,
impl<T> UnsafeUnpin for Splice<T>
impl<T> UnwindSafe for Splice<T>where
T: UnwindSafe,
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