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
cargo_manifest_file_path: &'a Path
The path of the Cargo.toml project file for the Rust project currently under evaluation.
verbose: bool
When true, Rule
implementations should supply additional
human-reader-oriented content by writing to print_output
metadata: &'a Option<Metadata>
Pre-parsed cargo metadata for the current project under evaluation.
Ought to be None
only when the cargo metadata retrieval or parsing
fails.
print_output: &'a mut Write
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> !Send for RuleContext<'a>
impl<'a> !Sync for RuleContext<'a>
impl<'a> !Sync for RuleContext<'a>