///
/// In order to figure out what combination of of SignalWrappers we need to generate
/// we go over all the the registered callback function and create a hash for the
/// function arguments. This way we get one unique function wrapper in the cases
/// where several wrapers has the same input
///
In order to figure out what combination of of SignalWrappers we need to generate
we go over all the the registered callback function and create a hash for the
function arguments. This way we get one unique function wrapper in the cases
where several wrapers has the same input
In order to figure out what combination of of SignalWrappers we need to generate we go over all the the registered callback function and create a hash for the function arguments . This way we get one unique function wrapper in the cases where several wrapers has the same input
fn build_signal_wrappers_info<'a>(api_defs: &'a [ApiDef]) -> HashMap<String, &'a Function> {
    let mut wrapper_info = HashMap::new();
    let mut funcs = Vec::new();
    for api_def in api_defs {
        for t in api_def.get_functions(FunctionType::Signal) {
            funcs.push(t);
        }
    }
    funcs.iter().for_each(|func| {
        let input_args = signal_type_callback(func);
        wrapper_info.entry(input_args).or_insert(*func);
    });
    wrapper_info
}
fn build_signal_wrappers_info < ' a > ( api_defs : & ' a [ ApiDef ] ) -> HashMap < String , & ' a Function > { let mut wrapper_info = HashMap :: new ( ) ; let mut funcs = Vec :: new ( ) ; for api_def in api_defs { for t in api_def . get_functions ( FunctionType :: Signal ) { funcs . push ( t ) ; } } funcs . iter ( ) . for_each ( | func | { let input_args = signal_type_callback ( func ) ; wrapper_info . entry ( input_args ) . or_insert ( * func ) ; } ) ; wrapper_info }
In order to figure out what combination of of SignalWrappers we need to generate
we go over all the the registered callback function and create a hash for the
function arguments.
In order to figure out what combination of of SignalWrappers we need to generate we go over all the the registered callback function and create a hash for the function arguments .
api_defs
&'a [ApiDef]