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 to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more