[−][src]Trait git_checks::impl_prelude::Content
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>
A workarea which may be used to work on the content.
fn sha1(&self) -> Option<&CommitId>
The SHA1 of the commit (if the content is of a commit).
fn diffs(&self) -> &Vec<DiffInfo>
The differences in the content.
fn path_diff(&self, path: &FileName) -> Result<String>
Get the patch difference for the given path.
Provided methods
fn modified_files(&self) -> Vec<&FileName>
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.
Implementors
impl Content for Commit
[src]
impl Content for Commit
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea> | [src] |
fn sha1(&self) -> Option<&CommitId> | [src] |
fn diffs(&self) -> &Vec<DiffInfo> | [src] |
fn path_diff(&self, path: &FileName) -> Result<String> | [src] |
fn modified_files(&self) -> Vec<&FileName> | [src] |
impl Content for Topic
[src]
impl Content for Topic