pub struct PatchPathOptions {
pub p_value: usize,
pub p_value_known: bool,
pub root: Vec<u8>,
pub prefix: Vec<u8>,
}Expand description
Path-resolution options for parse_unified_patch_with_options, mirroring
git apply’s -p<n> strip (p_value) and --directory=<root> prefix.
Fields§
§p_value: usizeNumber of leading path components to strip (-p<n>); default 1.
p_value_known: boolWhether p_value was given explicitly. When false, traditional (non-git)
diffs guess it from the ---/+++ lines.
root: Vec<u8>--directory=<dir> root, normalised with a trailing slash (or empty).
prefix: Vec<u8>The cwd prefix (state->prefix): the current directory relative to the
work tree, with a trailing slash (empty at the top level). Used only to
guess -p<n> for traditional patches run from a subdirectory; the prefix
itself is prepended to names by the caller, not here.
Trait Implementations§
Source§impl Clone for PatchPathOptions
impl Clone for PatchPathOptions
Source§fn clone(&self) -> PatchPathOptions
fn clone(&self) -> PatchPathOptions
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 moreAuto Trait Implementations§
impl Freeze for PatchPathOptions
impl RefUnwindSafe for PatchPathOptions
impl Send for PatchPathOptions
impl Sync for PatchPathOptions
impl Unpin for PatchPathOptions
impl UnsafeUnpin for PatchPathOptions
impl UnwindSafe for PatchPathOptions
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