pub struct GitEvent {
pub kind: GitEventKind,
pub short_hash: String,
pub message: String,
pub author: String,
pub timestamp: DateTime<Local>,
pub files_added: usize,
pub files_deleted: usize,
}Expand description
Gitイベント
Fields§
§kind: GitEventKindイベントの種類
short_hash: Stringコミットハッシュ(短縮形)
message: Stringコミットメッセージ(1行目)
作者名
timestamp: DateTime<Local>タイムスタンプ
files_added: usize変更ファイル数(追加)
files_deleted: usize変更ファイル数(削除)
Implementations§
Source§impl GitEvent
impl GitEvent
Sourcepub fn commit(
short_hash: String,
message: String,
author: String,
timestamp: DateTime<Local>,
files_added: usize,
files_deleted: usize,
) -> Self
pub fn commit( short_hash: String, message: String, author: String, timestamp: DateTime<Local>, files_added: usize, files_deleted: usize, ) -> Self
新しいコミットイベントを作成
Sourcepub fn merge(
short_hash: String,
message: String,
author: String,
timestamp: DateTime<Local>,
) -> Self
pub fn merge( short_hash: String, message: String, author: String, timestamp: DateTime<Local>, ) -> Self
新しいマージイベントを作成
Sourcepub fn relative_time(&self) -> String
pub fn relative_time(&self) -> String
相対時間を取得(例: “14m ago”, “2h ago”, “3d ago”)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitEvent
impl RefUnwindSafe for GitEvent
impl Send for GitEvent
impl Sync for GitEvent
impl Unpin for GitEvent
impl UnwindSafe for GitEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more