We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0245d4c commit 3f36703Copy full SHA for 3f36703
src/userdata.rs
@@ -679,6 +679,14 @@ impl AnyUserData {
679
matches!(type_id, Some(type_id) if type_id == TypeId::of::<T>())
680
}
681
682
+ /// Checks whether the type of this userdata is a [proxy object] for `T`.
683
+ ///
684
+ /// [proxy object]: crate::Lua::create_proxy
685
+ #[inline]
686
+ pub fn is_proxy<T: 'static>(&self) -> bool {
687
+ self.is::<UserDataProxy<T>>()
688
+ }
689
+
690
/// Borrow this userdata immutably if it is of type `T`.
691
///
692
/// # Errors
0 commit comments