Struct git_checks_core::Topic
source · pub struct Topic {
pub base: CommitId,
pub sha1: CommitId,
pub diffs: Vec<DiffInfo>,
/* private fields */
}
Expand description
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.
Implementations§
source§impl Topic
impl Topic
sourcepub fn new(
ctx: &GitContext,
base: &CommitId,
sha1: &CommitId
) -> Result<Self, CommitError>
pub fn new( ctx: &GitContext, base: &CommitId, sha1: &CommitId ) -> Result<Self, CommitError>
Create a new commit from the given context for the SHA1.
sourcepub fn file_patch<P>(&self, path: P) -> Result<String, CommitError>
pub fn file_patch<P>(&self, path: P) -> Result<String, CommitError>
Get the patch difference for the given path.
Trait Implementations§
source§impl Content for Topic
impl Content for Topic
source§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.
Auto Trait Implementations§
impl Freeze for Topic
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnwindSafe for Topic
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