Struct red4ext_rs::RttiSystemMut
source · pub struct RttiSystemMut(/* private fields */);
Expand description
The RTTI system containing information about all types in the game. This variant allows for modifying the RTTI system and locks it for exclusive access.
Implementations§
source§impl RttiSystemMut
impl RttiSystemMut
sourcepub fn get() -> RwSpinLockWriteGuard<'static, Self>
pub fn get() -> RwSpinLockWriteGuard<'static, Self>
Acquire a write lock on the RTTI system. You should be careful not to hold the lock for too long, because interleaving reads and write operations can lead to deadlocks.
sourcepub fn get_class(&mut self, name: CName) -> Option<&mut Class>
pub fn get_class(&mut self, name: CName) -> Option<&mut Class>
Retrieve a mutable reference to a class by its name
sourcepub fn register_class(&mut self, class: ClassHandle)
pub fn register_class(&mut self, class: ClassHandle)
Register a new ClassHandle
with the RTTI system.
The handle can be obtained from
NativeClass::new_handle
.
sourcepub fn register_function(&mut self, function: PoolRef<GlobalFunction>)
pub fn register_function(&mut self, function: PoolRef<GlobalFunction>)
Register a new GlobalFunction
with the RTTI system.
The function can be obtained from GlobalFunction::new
.
Auto Trait Implementations§
impl Freeze for RttiSystemMut
impl !RefUnwindSafe for RttiSystemMut
impl !Send for RttiSystemMut
impl !Sync for RttiSystemMut
impl Unpin for RttiSystemMut
impl !UnwindSafe for RttiSystemMut
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