Struct git2::ApplyOptions
source · pub struct ApplyOptions<'cb> { /* private fields */ }
Expand description
Options to specify when applying a diff
Implementations§
source§impl<'cb> ApplyOptions<'cb>
impl<'cb> ApplyOptions<'cb>
sourcepub fn check(&mut self, check: bool) -> &mut Self
pub fn check(&mut self, check: bool) -> &mut Self
Don’t actually make changes, just test that the patch applies.
sourcepub fn hunk_callback<F>(&mut self, cb: F) -> &mut Selfwhere
F: FnMut(Option<DiffHunk<'_>>) -> bool + 'cb,
pub fn hunk_callback<F>(&mut self, cb: F) -> &mut Selfwhere F: FnMut(Option<DiffHunk<'_>>) -> bool + 'cb,
When applying a patch, callback that will be made per hunk.
sourcepub fn delta_callback<F>(&mut self, cb: F) -> &mut Selfwhere
F: FnMut(Option<DiffDelta<'_>>) -> bool + 'cb,
pub fn delta_callback<F>(&mut self, cb: F) -> &mut Selfwhere F: FnMut(Option<DiffDelta<'_>>) -> bool + 'cb,
When applying a patch, callback that will be made per delta (file).
sourcepub unsafe fn raw(&mut self) -> *const git_apply_options
pub unsafe fn raw(&mut self) -> *const git_apply_options
Pointer to a raw git_stash_apply_options