Skip to main content

gen_function_with_mutex

Function gen_function_with_mutex 

Source
pub fn gen_function_with_mutex(
    func: &FunctionDef,
    mapper: &dyn TypeMapper,
    cfg: &RustBindingConfig<'_>,
    adapter_bodies: &AdapterBodies,
    opaque_types: &AHashSet<String>,
    mutex_types: &AHashSet<String>,
) -> String
Expand description

Generate a free function. mutex_types is the subset of opaque types whose inner field is Arc<Mutex<T>> (because the type has &mut self methods); their constructors emit Arc::new(Mutex::new(v)) instead of Arc::new(v).