We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
AnyUserData::type_name
1 parent a4c8b20 commit 3a2fd1eCopy full SHA for 3a2fd1e
src/userdata.rs
@@ -921,8 +921,10 @@ impl AnyUserData {
921
lua.get_userdata_ref_type_id(&self.0).ok().flatten()
922
}
923
924
- /// Returns a type name of this `UserData` (from a metatable field).
925
- pub(crate) fn type_name(&self) -> Result<Option<StdString>> {
+ /// Returns a type name of this userdata (from a metatable field).
+ ///
926
+ /// If no type name is set, returns `None`.
927
+ pub fn type_name(&self) -> Result<Option<StdString>> {
928
let lua = self.0.lua.lock();
929
let state = lua.state();
930
unsafe {
0 commit comments