[][src]Struct git_anger_library::author::Author

pub struct Author {
    pub name: String,
    pub total_commits: usize,
    pub total_curses: usize,
    pub curses: HashMap<String, usize>,
}

An author of a git commit.

Fields

name: String

Name of the author.

total_commits: usize

Total count of commits by author.

total_curses: usize

Total count of curses used by author.

curses: HashMap<String, usize>

HashMap of all the curses the author used.

Implementations

impl Author[src][]

pub fn new(name: impl Into<String>) -> Self[src][]

Initialize a new author from a name.

pub fn update_occurrence(&mut self, curse: &str)[src][]

Update a previously used curse or add a new one.

pub fn is_naughty(&self) -> bool[src][]

git-anger-management knows if you've been naughty or not

Trait Implementations

impl Debug for Author[src][+]

impl Serialize for Author[src][+]

Auto Trait Implementations

impl RefUnwindSafe for Author

impl Send for Author

impl Sync for Author

impl Unpin for Author

impl UnwindSafe for Author

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.