#[non_exhaustive]pub enum PatchOp {
Add {
path: String,
contents: String,
},
Delete {
path: String,
},
Update {
path: String,
move_to: Option<String>,
hunks: Vec<Hunk>,
},
}Expand description
One file operation of a Patch.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Add
Create a file that does not exist.
Delete
Delete a file.
Update
Change a file, and optionally move it.
Trait Implementations§
impl Eq for PatchOp
impl StructuralPartialEq for PatchOp
Auto Trait Implementations§
impl Forget for PatchOp
impl Freeze for PatchOp
impl Move for PatchOp
impl RefUnwindSafe for PatchOp
impl Send for PatchOpwhere
RawVecInner: Send,
impl Sync for PatchOpwhere
RawVecInner: Sync,
impl Unpin for PatchOp
impl UnsafeUnpin for PatchOpwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Hunk>: UnsafeUnpin,
impl UnwindSafe for PatchOpwhere
RawVecInner: 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