pub enum PatchSide {
Bytes(Vec<u8>),
Blob,
Worktree,
}Expand description
Where write_patch_resolved takes the content of one side of a file.
Pass PatchSide::Bytes for content already in memory. A caller that skipped loading
a side (diff collection usually drops binary content, which structured hunks never use)
names where the side lives instead, and the writer reads it only while rendering that
file. A side whose mode in PatchResolvedSide::entry is 000000 is empty whatever
variant is given.
Variants§
Bytes(Vec<u8>)
Content the caller already loaded, in repository form.
Blob
The blob named by this side’s id in PatchResolvedSide::entry, read from the
object database.
Worktree
The work-tree file at this side’s path, converted to repository form the way
git add would (clean filters, .gitattributes and line-ending rules).
Trait Implementations§
impl Eq for PatchSide
impl StructuralPartialEq for PatchSide
Auto Trait Implementations§
impl Freeze for PatchSide
impl RefUnwindSafe for PatchSide
impl Send for PatchSide
impl Sync for PatchSide
impl Unpin for PatchSide
impl UnsafeUnpin for PatchSide
impl UnwindSafe for PatchSide
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