Skip to main content

declared_path

Function declared_path 

Source
pub fn declared_path(
    ast: &Ast,
    id: Id<TypeNode>,
) -> Result<String, MaterialiseError>
Expand description

Where a declaration sits, as Java has to write it: ZdTypes.a.b.Name.

type_tag joins the same segments with _ and is a name — what a generated codec method is called after. This is the path, which is what reaches the class: every declaration nests inside ZdTypes because Java allows one public top-level type per file, and a caller that spelled ZdTypes.a_b_Name would name nothing.

§Errors

When the module chain nests past the cap.