diff options
Diffstat (limited to 'engine-reflection')
| -rw-r--r-- | engine-reflection/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs index 0382598..c884edb 100644 --- a/engine-reflection/src/lib.rs +++ b/engine-reflection/src/lib.rs @@ -89,6 +89,8 @@ pub struct EnumVariant /// The fields of this variant. If `None`, this variant is a unit variant. pub fields: Option<EnumVariantFields>, + + pub discriminant: EnumDiscriminant, } #[derive(Debug, Clone)] @@ -104,6 +106,15 @@ pub enum EnumVariantFields }, } +/// The discriminant of a enum variant. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct EnumDiscriminant +{ + /// This buffer is the size of a u128/i128 because they are the largest possible enum + /// discriminant representations. + pub buf: [u8; size_of::<u128>()], +} + #[derive(Debug, Clone)] pub struct Field { |
