pub struct DiffViewState {
pub selection: Selection,
/* private fields */
}Expand description
The view’s state, kept by the app: selection, expanded ranges, folded files.
Fields§
§selection: SelectionSelected rows (row indices of the current layout).
Implementations§
Source§impl DiffViewState
impl DiffViewState
pub fn new() -> Self
Sourcepub fn expand(&mut self, file: usize, gap: usize, lines: u32)
pub fn expand(&mut self, file: usize, gap: usize, lines: u32)
Shows lines more lines of collapsed range gap of file (see FileDiff::gaps).
Sourcepub fn expanded(&self, file: usize, gap: usize) -> u32
pub fn expanded(&self, file: usize, gap: usize) -> u32
Lines of range gap of file shown so far.
Sourcepub fn set_file_collapsed(&mut self, file: usize, collapsed: bool)
pub fn set_file_collapsed(&mut self, file: usize, collapsed: bool)
Folds or unfolds a file to its header.
pub fn is_file_collapsed(&self, file: usize) -> bool
Trait Implementations§
Source§impl Clone for DiffViewState
impl Clone for DiffViewState
Source§impl Debug for DiffViewState
impl Debug for DiffViewState
Auto Trait Implementations§
impl Forget for DiffViewState
impl Freeze for DiffViewState
impl Move for DiffViewState
impl RefUnwindSafe for DiffViewState
impl Send for DiffViewState
impl Sync for DiffViewState
impl Unpin for DiffViewState
impl UnsafeUnpin for DiffViewState
impl UnwindSafe for DiffViewState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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