pub struct OnChangeBlock { /* private fields */ }Implementations§
Source§impl OnChangeBlock
impl OnChangeBlock
pub fn new( file: PathBuf, name: Option<String>, start_line: u32, end_line: u32, then_change: ThenChange, ) -> Self
pub fn name(&self) -> &str
pub fn file(&self) -> &Path
pub fn name_raw(&self) -> Option<&str>
pub fn is_targetable(&self) -> bool
pub fn start_line(&self) -> u32
pub fn end_line(&self) -> u32
pub fn then_change(&self) -> &ThenChange
Sourcepub fn is_hunk_overlap(&self, hunk: &Hunk) -> bool
pub fn is_hunk_overlap(&self, hunk: &Hunk) -> bool
Fast check to see if a hunk overlaps with this block.
Sourcepub fn is_changed_by_hunk(&self, hunk: &Hunk) -> bool
pub fn is_changed_by_hunk(&self, hunk: &Hunk) -> bool
Returns true if this block has been changed by the given hunk.
Trait Implementations§
Source§impl Clone for OnChangeBlock
impl Clone for OnChangeBlock
Source§fn clone(&self) -> OnChangeBlock
fn clone(&self) -> OnChangeBlock
Returns a duplicate of the value. Read more
1.0.0 · 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 OnChangeBlock
impl RefUnwindSafe for OnChangeBlock
impl Send for OnChangeBlock
impl Sync for OnChangeBlock
impl Unpin for OnChangeBlock
impl UnwindSafe for OnChangeBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more