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

source

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.

source

pub fn get_class(&mut self, name: CName) -> Option<&mut Class>

Retrieve a mutable reference to a class by its name

source

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.

source

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.