Trait git_checks_core::Content
source · [−]pub trait Content {
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea, WorkAreaError>;
fn sha1(&self) -> Option<&CommitId>;
fn diffs(&self) -> &Vec<DiffInfo>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn path_diff(&self, path: &FileName) -> Result<String, CommitError>;
fn modified_files(&self) -> Vec<&FileName>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
}
Expand description
A trait for representing the content of a diff.
This may be used for checks which do not require any metadata.
Required methods
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea, WorkAreaError>
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea, WorkAreaError>
A workarea which may be used to work on the content.
The differences in the content.
Provided methods
Return a vector of files modified in a diff.
This excludes paths which are either not actually files (e.g., submodules and symlinks), as well as paths which were deleted in this commit.