#[repr(C)]pub struct TESGlobal {
pub __base: TESForm,
pub form_editor_id: BSString,
pub type_: Type_CEnum,
pub pad31: u8,
pub pad32: u16,
pub value: c_float,
}
Expand description
Represents a global variable in Skyrim.
Fields§
§__base: TESForm
Base class TESForm
.
form_editor_id: BSString
The form editor ID.
- Offset:
0x20
type_: Type_CEnum
The type of the global (float, long, short).
- Offset:
0x30
pad31: u8
Padding for alignment.
- Offset:
0x31
pad32: u16
Additional padding.
- Offset:
0x32
value: c_float
The value of the global variable.
- Offset:
0x34
Implementations§
Source§impl TESGlobal
impl TESGlobal
Sourcepub const RTTI: VariantID = RTTI_TESGlobal
pub const RTTI: VariantID = RTTI_TESGlobal
Address & Offset of the runtime type information (RTTI) identifier.
Sourcepub const VTABLE: [VariantID; 1] = VTABLE_TESGlobal
pub const VTABLE: [VariantID; 1] = VTABLE_TESGlobal
Address & Offset of the virtual function table.
pub const FORM_TYPE: FormType = FormType::Global
Sourcepub const fn get_form_editor_id(&self) -> &CStr
pub const fn get_form_editor_id(&self) -> &CStr
Gets the form editor ID as a &str
.
Sourcepub fn set_form_editor_id(&mut self, id: &CStr) -> Result<(), BSStringError>
pub fn set_form_editor_id(&mut self, id: &CStr) -> Result<(), BSStringError>
Sets the form editor ID.
§Errors
- If the string is too long to fit in a
u16
, or if allocation fails. - If allocations fail.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TESGlobal
impl RefUnwindSafe for TESGlobal
impl !Send for TESGlobal
impl !Sync for TESGlobal
impl Unpin for TESGlobal
impl UnwindSafe for TESGlobal
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