Struct git_checks::impl_prelude::Topic [−][src]
pub struct Topic {
pub base: CommitId,
pub sha1: CommitId,
pub diffs: Vec<DiffInfo>,
// some fields omitted
}Representation of a topic with information useful for commit checks.
Fields
base: CommitId
The SHA1 of the base commit.
sha1: CommitId
The SHA1 of the commit.
diffs: Vec<DiffInfo>
Information about files that changed in this commit.
Methods
impl Topic[src]
impl Topicpub fn new(ctx: &GitContext, base: &CommitId, sha1: &CommitId) -> Result<Self>[src]
pub fn new(ctx: &GitContext, base: &CommitId, sha1: &CommitId) -> Result<Self>Create a new commit from the given context for the SHA1.
pub fn file_patch<P>(&self, path: P) -> Result<String> where
P: AsRef<OsStr>, [src]
pub fn file_patch<P>(&self, path: P) -> Result<String> where
P: AsRef<OsStr>, Get the patch difference for the given path.
Trait Implementations
impl Debug for Topic[src]
impl Debug for Topicfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Content for Topic[src]
impl Content for Topicfn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea>[src]
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea>A workarea which may be used to work on the content.
fn sha1(&self) -> Option<&CommitId>[src]
fn sha1(&self) -> Option<&CommitId>The SHA1 of the commit (if the content is of a commit).
fn diffs(&self) -> &Vec<DiffInfo>[src]
fn diffs(&self) -> &Vec<DiffInfo>The differences in the content.
fn path_diff(&self, path: &FileName) -> Result<String>[src]
fn path_diff(&self, path: &FileName) -> Result<String>Get the patch difference for the given path.
fn modified_files(&self) -> Vec<&FileName>[src]
fn modified_files(&self) -> Vec<&FileName>Return a vector of files modified in a diff. Read more