#[repr(transparent)]pub struct MessageType_CEnum(pub u32);Expand description
Auto-generated FFI type for MessageType.
§When use this?
C’s enum is really just a number and there is no guarantee that it will fit within the enum. Therefore, it is used for the following cases that cannot be controlled by Rust.
- C++ members
- Function return values.
§When not to use it?
Mainly those that can be controlled for safety on the Rust side.
- Function Arguments
§Convenient methods
to_enum/from_enum: To inter-convert enums.count: Returns the number of defined discriminants.
§Memory Layout
It will always have #[repr(transparent)].
In other words, it is equivalent to the size specified in repr.
Tuple Fields§
§0: u32Implementations§
Source§impl MessageType_CEnum
impl MessageType_CEnum
Sourcepub const PostPostLoad: Self
pub const PostPostLoad: Self
Fired after all PostLoad events have completed.
Sourcepub const PreLoadGame: Self
pub const PreLoadGame: Self
Fired before loading a game save.
Sourcepub const PostLoadGame: Self
pub const PostLoadGame: Self
Fired after loading a game save.
Sourcepub const DeleteGame: Self
pub const DeleteGame: Self
Fired before deleting a game save.
Sourcepub const InputLoaded: Self
pub const InputLoaded: Self
Fired when the input system is loaded.
Sourcepub const DataLoaded: Self
pub const DataLoaded: Self
Fired after all game data has loaded.
Sourcepub const fn to_enum(self) -> Option<MessageType>
pub const fn to_enum(self) -> Option<MessageType>
Converts to the corresponding enum variant.
Returns Some(MessageType) if the value is valid, otherwise None.
Sourcepub const fn from_enum(e: MessageType) -> Self
pub const fn from_enum(e: MessageType) -> Self
Creates the struct from the enum.
This allows for easy conversion back to the FFI-friendly representation.
Trait Implementations§
Source§impl Clone for MessageType_CEnum
impl Clone for MessageType_CEnum
Source§fn clone(&self) -> MessageType_CEnum
fn clone(&self) -> MessageType_CEnum
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more