pub struct DeclaredDir {
pub path: String,
pub rebuild: String,
pub why: Option<String>,
}Expand description
One directory a project declares prunable, and the command that puts it back.
Every adapter in this tool earns the right to delete a directory by finding a lockfile that can rebuild it. A declaration is the same bargain made by hand: the project states the directory, and states what rebuilds it, and dev-prune checks that the stated command is one this machine could actually run before it deletes anything.
rebuild is required, and required is the point. An optional one would have made
“delete this, I have no idea how to get it back” the path of least resistance in a
file that gets committed and cloned.
Fields§
§path: StringRepository-relative, /-separated. Never absolute, never .., never .git.
rebuild: StringThe command that rebuilds it. Shown, never run — see crate::declared.
why: Option<String>Why this is safe to lose, in the project’s own words. Printed beside the path.
Trait Implementations§
Source§impl Clone for DeclaredDir
impl Clone for DeclaredDir
Source§fn clone(&self) -> DeclaredDir
fn clone(&self) -> DeclaredDir
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeclaredDir
impl Debug for DeclaredDir
Source§impl<'de> Deserialize<'de> for DeclaredDir
impl<'de> Deserialize<'de> for DeclaredDir
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>,
impl Eq for DeclaredDir
Source§impl PartialEq for DeclaredDir
impl PartialEq for DeclaredDir
Source§impl Serialize for DeclaredDir
impl Serialize for DeclaredDir
impl StructuralPartialEq for DeclaredDir
Auto Trait Implementations§
impl Freeze for DeclaredDir
impl RefUnwindSafe for DeclaredDir
impl Send for DeclaredDir
impl Sync for DeclaredDir
impl Unpin for DeclaredDir
impl UnsafeUnpin for DeclaredDir
impl UnwindSafe for DeclaredDir
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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