summaryrefslogtreecommitdiff
path: root/engine-reflection/src
diff options
context:
space:
mode:
Diffstat (limited to 'engine-reflection/src')
-rw-r--r--engine-reflection/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs
index c884edb..bad26df 100644
--- a/engine-reflection/src/lib.rs
+++ b/engine-reflection/src/lib.rs
@@ -127,13 +127,18 @@ pub struct Field
pub byte_offset: usize,
pub type_id: TypeId,
- pub type_name: &'static str,
+ pub get_type_name: FnWithDebug<&'static str>,
pub get_type: FnWithDebug<Option<&'static Type>>,
pub visibility: Visibility,
}
impl Field
{
+ pub fn type_name(&self) -> &'static str
+ {
+ self.get_type_name.get()
+ }
+
pub fn type_reflection(&self) -> Option<&'static Type>
{
self.get_type.get()