pub struct DiffViewer<'a> { /* private fields */ }Expand description
Diff viewer widget
Implementations§
Source§impl<'a> DiffViewer<'a>
impl<'a> DiffViewer<'a>
Sourcepub fn new(state: &'a DiffViewerState) -> Self
pub fn new(state: &'a DiffViewerState) -> Self
Create a new diff viewer
Sourcepub fn style(self, style: DiffViewerStyle) -> Self
pub fn style(self, style: DiffViewerStyle) -> Self
Set the style
Sourcepub fn show_line_numbers(self, _show: bool) -> Self
pub fn show_line_numbers(self, _show: bool) -> Self
Enable or disable line numbers
Sourcepub fn show_stats(self, show: bool) -> Self
pub fn show_stats(self, show: bool) -> Self
Enable or disable stats display
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DiffViewer<'a>
impl<'a> RefUnwindSafe for DiffViewer<'a>
impl<'a> Send for DiffViewer<'a>
impl<'a> Sync for DiffViewer<'a>
impl<'a> Unpin for DiffViewer<'a>
impl<'a> UnwindSafe for DiffViewer<'a>
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> 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