diff options
| author | HampusM <hampus@hampusmat.com> | 2026-07-07 00:52:05 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-07-07 00:52:05 +0200 |
| commit | 0820dde7d6099f87f9eda6240b64306900e00855 (patch) | |
| tree | ec2f1d0e52dd998fb4d133da2ea36121adaa5f86 /engine-reflection/src | |
| parent | 9ab4c266523faa170c00f28cab43b91137a3f531 (diff) | |
feat(engine-reflection): add EnumVariantField type_name & type_reflection fns
Diffstat (limited to 'engine-reflection/src')
| -rw-r--r-- | engine-reflection/src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs index 8436e65..a76abce 100644 --- a/engine-reflection/src/lib.rs +++ b/engine-reflection/src/lib.rs @@ -220,6 +220,19 @@ pub struct EnumVariantField pub get_type: FnWithDebug<Option<&'static Type>>, } +impl EnumVariantField +{ + pub fn type_name(&self) -> &'static str + { + self.get_type_name.get() + } + + pub fn type_reflection(&self) -> Option<&'static Type> + { + self.get_type.get() + } +} + #[derive(Debug, Clone)] pub struct Field { |
