pub struct Project {
pub path: PathBuf,
pub name: String,
pub last_modified: DateTime<Utc>,
pub git_status: ProjectGitStatus,
pub frecency_score: f64,
pub last_accessed: Option<DateTime<Utc>>,
pub access_count: u32,
pub readme_excerpt: Option<String>,
}Expand description
Represents a project (git repository) with metadata and access tracking
Fields§
§path: PathBufAbsolute path to project root
name: StringProject name (directory name)
last_modified: DateTime<Utc>Last modified time (from git or filesystem)
git_status: ProjectGitStatusGit status information
frecency_score: f64Frecency score (frequency + recency)
last_accessed: Option<DateTime<Utc>>Last accessed timestamp
access_count: u32Access count for frecency calculation
readme_excerpt: Option<String>First line of README (if exists)
Implementations§
Source§impl Project
impl Project
Sourcepub fn from_git_repo(path: PathBuf) -> Result<Self>
pub fn from_git_repo(path: PathBuf) -> Result<Self>
Create a Project from a git repository path
Extracts git status, last commit, README excerpt, and initializes frecency tracking fields.
Sourcepub fn extract_readme_excerpt(repo_path: &Path) -> Option<String>
pub fn extract_readme_excerpt(repo_path: &Path) -> Option<String>
Extract first line of README file
Sourcepub fn update_frecency_score(&mut self)
pub fn update_frecency_score(&mut self)
Update frecency score based on current access_count and last_accessed
This should be called after updating access tracking fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Project
impl<'de> Deserialize<'de> for Project
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
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