[−][src]Struct git_anger_library::repo::Repo
A simple representation of a git repository.
Fields
name: String
Name of the repository.
total_commits: usize
Count of the total amount of commits in the repository.
total_curses: usize
Count of the total amount of curses used in the commits.
curses: HashMap<String, usize>
HashMap of all the naughty words used by the authors.
HashMap of all the authors that have been committed.
Implementations
impl Repo
[src]
pub fn new(path: &Path) -> Result<Self, Box<dyn Error>>
[src]
Creates a new and empty repository.
pub fn author(&mut self, author_name: &str) -> &mut Author
[src]
Checks if an author exists and creates a new author if she/he doesn't exist.
pub fn count_curses(&mut self)
[src]
Counts all the naughty words used by authors.
pub fn print_json(&self) -> Result<(), Box<dyn Error>>
[src]
Serialize the Repo
struct into a JSON-object and print it.
pub fn print_list(&self) -> Result<(), Box<dyn Error>>
[src]
Build a table to display naughty authors and their words.
pub fn commits(repo: &Repository) -> Result<Vec<Commit>, Box<dyn Error>>
[src]
Build a list of commits by walking the history of a repository.
pub fn build(&mut self, commits: Vec<Commit>)
[src]
Iterate over all commits, finding authors who have been naughty and keep track of them.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Repo
impl Send for Repo
impl Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,