Struct cargo_culture_kit::rules::RuleContext[][src]

pub struct RuleContext<'a> {
    pub cargo_manifest_file_path: &'a Path,
    pub verbose: bool,
    pub metadata: &'a Option<Metadata>,
    pub print_output: &'a mut Write,
}

Parameter struct for the Rule::evaluate method. Should provide the minimum information necessary for project-level quality and completeness checks to be run.

Fields

The path of the Cargo.toml project file for the Rust project currently under evaluation.

When true, Rule implementations should supply additional human-reader-oriented content by writing to print_output

Pre-parsed cargo metadata for the current project under evaluation. Ought to be None only when the cargo metadata retrieval or parsing fails.

Output Write implementation intended for supplying optional textual content visible to the end-user. Rule implementations may make use of this as they wish, the default convention is to only write extra content when verbose == true

Auto Trait Implementations

impl<'a> !Send for RuleContext<'a>

impl<'a> !Sync for RuleContext<'a>