Skip to main content

Module generate_function

Module generate_function 

Source

StructsΒ§

AdtInfo πŸ”’
FunctionBuilder πŸ”’
Graph πŸ”’
Minimally implemented directed graph structure represented by adjacency list.
ParamBoundWithParams πŸ”’
TargetInfo πŸ”’
Visitor πŸ”’
WherePredWithParams πŸ”’

EnumsΒ§

GeneratedFunctionTarget πŸ”’
Visibility πŸ”’

FunctionsΒ§

add_func_to_accumulator πŸ”’
add_generated_fn_annotation πŸ”’
assoc_fn_target_info πŸ”’
calculate_necessary_visibility πŸ”’
compute_contained_params_in_generic_param πŸ”’
compute_contained_params_in_where_pred πŸ”’
containing_body πŸ”’
deduplicate_arg_names πŸ”’
Makes duplicate argument names unique by appending incrementing numbers.
filter_bounds_in_scope πŸ”’
Filters out bounds from impl if we’re generating the function into the same impl we’re generating from.
filter_generic_params πŸ”’
filter_unnecessary_bounds πŸ”’
Filters out irrelevant bounds from generic_params and where_preds.
fn_arg_name πŸ”’
fn_arg_type πŸ”’
fn_args πŸ”’
Computes parameter list for the generated function.
fn_generic_params πŸ”’
Gets parameter bounds and where predicates in scope and filters out irrelevant ones. Returns None when it fails to get scope information.
fn_target_info πŸ”’
gen_fn πŸ”’
gen_method πŸ”’
generate_function πŸ”’
get_adt_source πŸ”’
get_bounds_in_scope πŸ”’
get_fn_target πŸ”’
get_fn_target_info πŸ”’
get_method_target πŸ”’
insert_rendered_fn πŸ”’
insert_rendered_impl πŸ”’
make_fn_body_as_new_function πŸ”’
make_return_type πŸ”’
Makes an optional return type along with whether the return type should be focused by the cursor. If we cannot infer what the return type should be, we create a placeholder type.
next_space_for_fn_after_call_site πŸ”’
Returns the position inside the current mod or file directly after the current block We want to write the generated function directly after fns, impls or macro calls, but inside mods
next_space_for_fn_in_module πŸ”’
params_and_where_preds_in_scope πŸ”’