#[repr(C)]pub struct Setting {
pub vtable: *const SettingVtbl,
/* private fields */
}
Expand description
Represents a game setting with multiple data types.
§Memory Layout:
data
: Union containing the setting value (0x08)name
: Pointer to the setting’s name (0x10)
Fields§
§vtable: *const SettingVtbl
Implementations§
Source§impl Setting
impl Setting
Sourcepub const fn is_managed(&self) -> bool
pub const fn is_managed(&self) -> bool
Checks whether the setting is managed (i.e., dynamically allocated).
Sourcepub const fn get_name(&self) -> Option<&CStr>
pub const fn get_name(&self) -> Option<&CStr>
Returns the name as &CStr
if available.
e.g. key: "sOk"
-> value: "OK"
then, return "sOk
§Errors
Returns None
if the pointer is null.
Sourcepub const fn get_value(&self) -> SettingValue<'_>
pub const fn get_value(&self) -> SettingValue<'_>
Returns the value as a typed enum.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Setting
impl RefUnwindSafe for Setting
impl !Send for Setting
impl !Sync for Setting
impl Unpin for Setting
impl UnwindSafe for Setting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more