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§
Source§impl<'de, T> Deserialize<'de> for Splice<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Splice<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Vec<T>: RefUnwindSafe,
impl<T> Send for Splice<T>
impl<T> Sync for Splice<T>
impl<T> Unpin for Splice<T>
impl<T> UnsafeUnpin for Splice<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Splice<T>where
Vec<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