(&self, vm: &VirtualMachine)
| 1475 | #[deprecated(note = "use downcast_ref instead")] |
| 1476 | #[inline(always)] |
| 1477 | pub fn payload_if_subclass<T: crate::PyPayload>(&self, vm: &VirtualMachine) -> Option<&T> { |
| 1478 | if self.class().fast_issubclass(T::class(&vm.ctx)) { |
| 1479 | #[allow(deprecated)] |
| 1480 | self.payload() |
| 1481 | } else { |
| 1482 | None |
| 1483 | } |
| 1484 | } |
| 1485 | |
| 1486 | #[inline] |
| 1487 | pub(crate) fn typeid(&self) -> TypeId { |
nothing calls this directly
no test coverage detected