mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Make AnyUserData::type_name public
This commit is contained in:
+4
-2
@@ -921,8 +921,10 @@ impl AnyUserData {
|
||||
lua.get_userdata_ref_type_id(&self.0).ok().flatten()
|
||||
}
|
||||
|
||||
/// Returns a type name of this `UserData` (from a metatable field).
|
||||
pub(crate) fn type_name(&self) -> Result<Option<StdString>> {
|
||||
/// Returns a type name of this userdata (from a metatable field).
|
||||
///
|
||||
/// If no type name is set, returns `None`.
|
||||
pub fn type_name(&self) -> Result<Option<StdString>> {
|
||||
let lua = self.0.lua.lock();
|
||||
let state = lua.state();
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user