pub struct Project {
pub id: ProjectId,
pub kind: ProjectKind,
pub root: PathBuf,
pub name: String,
pub last_modified: Option<SystemTime>,
pub git_status: Option<GitStatus>,
pub artifacts: Vec<Artifact>,
pub total_size: u64,
pub cleanable_size: u64,
}Expand description
A detected development project
Fields§
§id: ProjectIdUnique identifier
kind: ProjectKindProject ecosystem/type
root: PathBufRoot directory path
name: StringProject name (usually directory name)
last_modified: Option<SystemTime>Last modification time (skipped in serialization)
git_status: Option<GitStatus>Git status (if available, skipped in serialization)
artifacts: Vec<Artifact>Cleanable artifacts found
total_size: u64Total size of all artifacts
cleanable_size: u64Size that can be cleaned
Implementations§
Source§impl Project
impl Project
Sourcepub fn new(kind: ProjectKind, root: PathBuf) -> Self
pub fn new(kind: ProjectKind, root: PathBuf) -> Self
Create a new project
Sourcepub fn safety_check(&self) -> CleanSafety
pub fn safety_check(&self) -> CleanSafety
Check if it’s safe to clean this project
Sourcepub fn artifact_count(&self) -> usize
pub fn artifact_count(&self) -> usize
Get the number of artifacts
Sourcepub fn calculate_totals(&mut self)
pub fn calculate_totals(&mut self)
Calculate totals from artifacts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more