[−][src]Struct git_checks_core::Topic
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]
pub fn new(
ctx: &GitContext,
base: &CommitId,
sha1: &CommitId
) -> Result<Self, CommitError>
[src]
ctx: &GitContext,
base: &CommitId,
sha1: &CommitId
) -> Result<Self, CommitError>
Create a new commit from the given context for the SHA1.
pub fn file_patch<P>(&self, path: P) -> Result<String, CommitError> where
P: AsRef<OsStr>,
[src]
P: AsRef<OsStr>,
Get the patch difference for the given path.
Trait Implementations
impl Content for Topic
[src]
fn workarea(&self, ctx: &GitContext) -> Result<GitWorkArea, WorkAreaError>
[src]
fn sha1(&self) -> Option<&CommitId>
[src]
fn diffs(&self) -> &Vec<DiffInfo>
[src]
fn path_diff(&self, path: &FileName) -> Result<String, CommitError>
[src]
fn modified_files(&self) -> Vec<&FileName>
[src]
impl Debug for Topic
[src]
Auto Trait Implementations
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnwindSafe for Topic
impl RefUnwindSafe for Topic
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,