Skip to main content

hao_il2cpp/
reflect.rs

1//! Reflection roots for the `reflect` feature. See [`hao::reflect`](https://docs.rs/hao/latest/hao/reflect/index.html) for the
2//! pattern: a consumer walks these shapes to reach every reflected type.
3
4use facet::{Facet, Shape};
5
6/// The entry-point shapes of hao-il2cpp. [`Game`](crate::Game) and
7/// [`Binary`](crate::Binary) reach the live views and image structures,
8/// [`Metadata`](crate::Metadata) the parsed definitions, and
9/// [`GeneratedAssembly`](crate::GeneratedAssembly) the generated output.
10pub fn roots() -> &'static [&'static Shape] {
11    &[
12        <crate::Game as Facet>::SHAPE,
13        <crate::Binary as Facet>::SHAPE,
14        <crate::Metadata as Facet>::SHAPE,
15        <crate::GeneratedAssembly as Facet>::SHAPE,
16    ]
17}