Method
payload_if_exact
(&self, vm: &VirtualMachine)
Source from the content-addressed store, hash-verified
| 1442 | #[deprecated(note = "use downcast_ref_if_exact instead")] |
| 1443 | #[inline(always)] |
| 1444 | pub fn payload_if_exact<T: PyPayload>(&self, vm: &VirtualMachine) -> Option<&T> { |
| 1445 | if self.class().is(T::class(&vm.ctx)) { |
| 1446 | #[allow(deprecated)] |
| 1447 | self.payload() |
| 1448 | } else { |
| 1449 | None |
| 1450 | } |
| 1451 | } |
| 1452 | |
| 1453 | #[inline(always)] |
| 1454 | fn instance_dict(&self) -> Option<&InstanceDict> { |
Callers
nothing calls this directly
Tested by
no test coverage detected