From ea95389b7fae4d75f3c8b6c465866834545ad5d9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 9 Jun 2026 17:36:17 +0200 Subject: feat(engine): add offsets to reflection of enum variant fields --- engine-reflection/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engine-reflection/src/lib.rs') diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs index 53aa953..0382598 100644 --- a/engine-reflection/src/lib.rs +++ b/engine-reflection/src/lib.rs @@ -110,7 +110,11 @@ pub struct Field pub name: Option<&'static str>, pub index: usize, pub layout: Layout, - pub byte_offset: Option, + + /// Byte offset to the field relative to the start of the type containing it. If the + /// type containing the field is a enum, this offset will include the enum tag + pub byte_offset: usize, + pub type_id: TypeId, pub type_name: &'static str, pub get_type: FnWithDebug>, -- cgit v1.2.3-18-g5258