pub struct Config {
pub exclude: HashSet<String>,
pub essential: HashSet<String>,
pub dev_only: HashSet<String>,
pub skip_tests: bool,
}Expand description
Configuration for cargo-autodd
Fields§
§exclude: HashSet<String>Crates to exclude from analysis
essential: HashSet<String>Additional essential dependencies (never removed)
dev_only: HashSet<String>Crates to always treat as dev-dependencies
skip_tests: boolWhether to skip tests/ directory analysis
Implementations§
Source§impl Config
impl Config
Sourcepub fn load_default(project_root: &Path) -> Result<Self>
pub fn load_default(project_root: &Path) -> Result<Self>
Load config from the default path (.cargo-autodd.toml)
Sourcepub fn should_exclude(&self, crate_name: &str) -> bool
pub fn should_exclude(&self, crate_name: &str) -> bool
Check if a crate should be excluded
Sourcepub fn is_essential(&self, crate_name: &str) -> bool
pub fn is_essential(&self, crate_name: &str) -> bool
Check if a crate is essential (should never be removed)
Sourcepub fn is_dev_only(&self, crate_name: &str) -> bool
pub fn is_dev_only(&self, crate_name: &str) -> bool
Check if a crate should always be a dev-dependency
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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