Iterate over all the [`ProcedureDef`]s defined by the module, in alphabetical order by name. Skipping internal [`FunctionVisibiity::Internal`] procedures because they should not be directly invokable. Sorting is necessary to have deterministic reproducible codegen.
(
module: &ModuleDef,
visibility: CodegenVisibility,
)
| 124 | /// directly invokable. |
| 125 | /// Sorting is necessary to have deterministic reproducible codegen. |
| 126 | pub(super) fn iter_procedures( |
| 127 | module: &ModuleDef, |
| 128 | visibility: CodegenVisibility, |
| 129 | ) -> impl Iterator<Item = &ProcedureDef> { |
| 130 | module |
| 131 | .procedures() |
| 132 | .sorted_by_key(|procedure| &procedure.name) |
| 133 | .filter(move |procedure| match visibility { |
| 134 | CodegenVisibility::IncludePrivate => true, |
| 135 | CodegenVisibility::OnlyPublic => !procedure.visibility.is_private(), |
| 136 | }) |
| 137 | } |
| 138 | |
| 139 | /// Iterate over all the [`TableDef`]s defined by the module, in alphabetical order by name. |
| 140 | /// |
no test coverage detected
searching dependent graphs…