pub enum PatchChange {
Add {
content: String,
extra: HashMap<String, Value>,
},
Update {
unified_diff: String,
move_path: Option<String>,
extra: HashMap<String, Value>,
},
Delete {
original_content: Option<String>,
extra: HashMap<String, Value>,
},
Unknown,
}Expand description
One file’s change within a PatchApplyEnd. Three type values
documented upstream: add, update, delete. We strongly-type
the common two (add has content, update has unified_diff
and optional move_path) and leave room for more.
Variants§
Trait Implementations§
Source§impl Clone for PatchChange
impl Clone for PatchChange
Source§fn clone(&self) -> PatchChange
fn clone(&self) -> PatchChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatchChange
impl Debug for PatchChange
Source§impl<'de> Deserialize<'de> for PatchChange
impl<'de> Deserialize<'de> for PatchChange
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 Freeze for PatchChange
impl RefUnwindSafe for PatchChange
impl Send for PatchChange
impl Sync for PatchChange
impl Unpin for PatchChange
impl UnsafeUnpin for PatchChange
impl UnwindSafe for PatchChange
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