pub struct ContextSize { /* private fields */ }
Available on crate feature
blob
only.Expand description
Defines the size of the context printed before and after each change.
Similar to the -U
option in git diff or gnu-diff. If the context overlaps
with previous or next change, the context gets reduced accordingly.
Implementations§
Source§impl ContextSize
Instantiation
impl ContextSize
Instantiation
Sourcepub fn symmetrical(n: u32) -> Self
pub fn symmetrical(n: u32) -> Self
Create a symmetrical context with n
lines before and after a changed hunk.
Trait Implementations§
Source§impl Clone for ContextSize
impl Clone for ContextSize
Source§fn clone(&self) -> ContextSize
fn clone(&self) -> ContextSize
Returns a copy 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 moreSource§impl Debug for ContextSize
impl Debug for ContextSize
Source§impl Default for ContextSize
impl Default for ContextSize
Source§impl Hash for ContextSize
impl Hash for ContextSize
Source§impl Ord for ContextSize
impl Ord for ContextSize
Source§fn cmp(&self, other: &ContextSize) -> Ordering
fn cmp(&self, other: &ContextSize) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ContextSize
impl PartialEq for ContextSize
Source§impl PartialOrd for ContextSize
impl PartialOrd for ContextSize
impl Copy for ContextSize
impl Eq for ContextSize
impl StructuralPartialEq for ContextSize
Auto Trait Implementations§
impl Freeze for ContextSize
impl RefUnwindSafe for ContextSize
impl Send for ContextSize
impl Sync for ContextSize
impl Unpin for ContextSize
impl UnwindSafe for ContextSize
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