Function serde_generate::analyzer::get_dependency_map [−][src]
pub fn get_dependency_map(
registry: &Registry
) -> Result<BTreeMap<&str, BTreeSet<&str>>>
Expand description
Build a map of dependencies between the entries of a Registry
.
- By definition, an entry named
x
depends ony
iff the container format ofx
in the registry syntactically contains a reference toy
(i.e. an expressionFormat::TypeName(y)
). - Dependencies can play a role in code generation in some languages (e.g. Rust or C++) where inductive definitions may require explicit “boxing” (i.e. adding pointer indirections) to ensure finite object sizes.