We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 191990d + 3f36703 commit 47b93a2Copy full SHA for 47b93a2
1 file changed
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