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,
pub parent_hashes: Vec<String>,
pub branch_labels: Vec<String>,
pub session_id: Option<u32>,
pub inferred_intent: Option<ChangeIntent>,
}Expand description
Git event
Fields§
§kind: GitEventKindEvent type
short_hash: StringCommit hash (abbreviated)
message: StringCommit message (first line)
Author name
timestamp: DateTime<Local>Timestamp
files_added: usizeNumber of changed files (additions)
files_deleted: usizeNumber of changed files (deletions)
parent_hashes: Vec<String>List of parent commit hashes (for graph rendering)
branch_labels: Vec<String>Branch labels (branch names pointing to this commit)
session_id: Option<u32>AI session ID (if part of a detected AI session)
inferred_intent: Option<ChangeIntent>Inferred change intent
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
Create a new commit event
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
Create a new merge event
Sourcepub fn with_parents(self, parents: Vec<String>) -> Self
pub fn with_parents(self, parents: Vec<String>) -> Self
Set parent commits
Sourcepub fn with_labels(self, labels: Vec<String>) -> Self
pub fn with_labels(self, labels: Vec<String>) -> Self
Set branch labels
Sourcepub fn has_labels(&self) -> bool
pub fn has_labels(&self) -> bool
Check if labels exist
Sourcepub fn relative_time(&self) -> String
pub fn relative_time(&self) -> String
Get relative time (e.g., “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 UnsafeUnpin 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