Skip to main content

defined_names_with_visibility

Function defined_names_with_visibility 

Source
pub fn defined_names_with_visibility(code: &str) -> Vec<(String, bool)>
Expand description

Like defined_names, but also reports whether each definition is private (declared ## To private … / ## A private …). Public-by-default: a name with no private marker is false. Powers module encapsulation — a private name is usable by its owning module but not importable by any other file. Public so the language server can filter private names out of its cross-module surfaces (completion, auto-import, workspace symbols) from the one source of truth.