pub enum ListPatch<U> {
Update {
index: usize,
patch: U,
},
Insert {
index: usize,
value: U,
},
Push {
value: U,
},
Overwrite {
values: Vec<U>,
},
Remove {
index: usize,
},
Clear,
}Expand description
ListPatch
Patches apply sequentially; indices outside the current length are clamped to the tail and invalid removals are ignored.
Variants§
Trait Implementations§
Source§impl<U: CandidType> CandidType for ListPatch<U>
impl<U: CandidType> CandidType for ListPatch<U>
Source§impl<'de, U> Deserialize<'de> for ListPatch<U>where
U: Deserialize<'de>,
impl<'de, U> Deserialize<'de> for ListPatch<U>where
U: 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
Auto Trait Implementations§
impl<U> Freeze for ListPatch<U>where
U: Freeze,
impl<U> RefUnwindSafe for ListPatch<U>where
U: RefUnwindSafe,
impl<U> Send for ListPatch<U>where
U: Send,
impl<U> Sync for ListPatch<U>where
U: Sync,
impl<U> Unpin for ListPatch<U>where
U: Unpin,
impl<U> UnwindSafe for ListPatch<U>where
U: 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