pub struct SymlinkChange {
pub old: Option<Vec<u8>>,
pub new: Option<Vec<u8>>,
}Expand description
The raw symlink target bytes for each side of a symlink change. A
symlink’s git blob is exactly its target bytes (no trailing newline), so
these are the authoritative content the patch renderer emits. old is
None on an add, new is None on a delete, and both are Some on a
target-edit or rename-with-edit. The bytes come from the same loaders the
hunk path uses (symlink_target_bytes for the worktree, the stored blob
for a tree side), so a non-UTF-8 target survives without lossy conversion.
Fields§
§old: Option<Vec<u8>>§new: Option<Vec<u8>>Trait Implementations§
Source§impl Clone for SymlinkChange
impl Clone for SymlinkChange
Source§fn clone(&self) -> SymlinkChange
fn clone(&self) -> SymlinkChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SymlinkChange
impl Debug for SymlinkChange
Source§impl Default for SymlinkChange
impl Default for SymlinkChange
Source§fn default() -> SymlinkChange
fn default() -> SymlinkChange
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SymlinkChange
impl RefUnwindSafe for SymlinkChange
impl Send for SymlinkChange
impl Sync for SymlinkChange
impl Unpin for SymlinkChange
impl UnsafeUnpin for SymlinkChange
impl UnwindSafe for SymlinkChange
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