pub struct FileReview {
pub path: String,
pub old_path: Option<String>,
pub status: ChangeStatus,
pub detection: Detection,
pub is_test: bool,
pub fingerprint: u64,
/* private fields */
}Expand description
A changed file. Its diff under each choice of layers is computed on first use.
Fields§
§path: String§old_path: Option<String>§status: ChangeStatus§detection: Detection§is_test: boolThe whole file is test code; the test layer is file-granular.
fingerprint: u64Identifies this exact change (path and both versions) for review marks.
Implementations§
Source§impl FileReview
impl FileReview
pub fn new(change: FileChange) -> FileReview
pub fn view(&self, modes: impl Into<DiffModes>) -> Rc<ModeView>
pub fn total_hunks(&self) -> usize
Sourcepub fn is_visible(&self, tests: LayerMode) -> bool
pub fn is_visible(&self, tests: LayerMode) -> bool
Whether the file is listed at all under this test-layer mode.
Trait Implementations§
Source§impl Clone for FileReview
impl Clone for FileReview
Auto Trait Implementations§
impl !Freeze for FileReview
impl !RefUnwindSafe for FileReview
impl !Send for FileReview
impl !Sync for FileReview
impl Unpin for FileReview
impl UnsafeUnpin for FileReview
impl UnwindSafe for FileReview
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