[−][src]Function haybale_pitchfork::main_func
pub fn main_func<F>(
get_project: impl FnOnce() -> Project,
get_struct_descriptions: impl FnOnce() -> StructDescriptions,
get_args_for_funcname: impl Fn(&str) -> Option<Vec<AbstractData>>,
get_config: F
) where
F: Fn(&'p Project) -> Config<'p, Backend>,
This function is designed to be called in your main()
.
It processes command-line arguments and coordinates the overall analysis.
All you have to provide is:
get_project
: a closure which, when called, produces theProject
you want to analyzeget_struct_descriptions
: a closure which, when called, produces theStructDescriptions
you want to useget_args_for_funcname
: a function which takes a function name and returns theAbstractData
arguments to use for its arguments.None
implies to just use allAbstractData::default()
s.get_config
: a closure which, when called, produces theConfig
you want to use. Note that some parts of theConfig
may be overridden by command-line arguments.