//! Bulk-form per-policy requirement shape for the rustc adapter.

use aqc_cargo_toml_engine::{ItemRequirements, KeyedItem, LintSetting};

/// One policy's requirement to the rustc adapter.
///
/// rustc lints live only in `Cargo.toml` lint tables (there is no rustc
/// config file), so the surface is the two table forms; each field carries a
/// single table requirement.
#[derive(Debug, Clone, Default)]
pub struct RustcAdapterRequirement {
    /// rustc lints to enforce in `[workspace.lints.rust]`. Pick this when
    /// the target Cargo.toml is a workspace root.
    #[expect(
        clippy::type_complexity,
        reason = "The field spells out the public requirement contract; aliases are intentionally not used."
    )]
    pub cargo_workspace_rust_lints: Option<ItemRequirements<KeyedItem<LintSetting>>>,
    /// rustc lints to enforce in `[lints.rust]` (the `package_lints` Inline
    /// form). Pick this for a leaf package without a workspace.
    #[expect(
        clippy::type_complexity,
        reason = "The field spells out the public requirement contract; aliases are intentionally not used."
    )]
    pub cargo_package_rust_lints: Option<ItemRequirements<KeyedItem<LintSetting>>>,
}
