pub struct UnityClassIdMap { /* private fields */ }Expand description
Unity class ID to name mapping This is a global registry that maps class IDs to class names
Implementations§
Source§impl UnityClassIdMap
impl UnityClassIdMap
pub fn new() -> Self
Sourcepub fn get_or_create(&self, class_id: &str, class_name: &str) -> String
pub fn get_or_create(&self, class_id: &str, class_name: &str) -> String
Get or create a class mapping
Sourcepub fn get_class_name(&self, class_id: i32) -> Option<String>
pub fn get_class_name(&self, class_id: i32) -> Option<String>
Get class name from class ID.
Sourcepub fn get_class_name_str(&self, class_id: i32) -> Option<&'static str>
pub fn get_class_name_str(&self, class_id: i32) -> Option<&'static str>
Get class name from class ID without allocating.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnityClassIdMap
impl RefUnwindSafe for UnityClassIdMap
impl Send for UnityClassIdMap
impl Sync for UnityClassIdMap
impl Unpin for UnityClassIdMap
impl UnwindSafe for UnityClassIdMap
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