Struct git_checks_core::impl_prelude::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
sourceimpl 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> where
P: AsRef<OsStr>,
pub fn file_patch<P>(&self, path: P) -> Result<String, CommitError> where
P: AsRef<OsStr>,
Get the patch difference for the given path.
Trait Implementations
sourceimpl Content for Topic
impl Content for Topic
sourcefn 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.
sourcefn diffs(&self) -> &Vec<DiffInfo>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn diffs(&self) -> &Vec<DiffInfo>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The differences in the content.
Auto Trait Implementations
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnwindSafe for Topic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more