Gets the raw underlying `&Instance` from this handle.
(&self)
| 1834 | |
| 1835 | /// Gets the raw underlying `&Instance` from this handle. |
| 1836 | pub fn get(&self) -> &T { |
| 1837 | // SAFETY: this is an owned instance handle that retains exclusive |
| 1838 | // ownership of the `Instance` inside. With `&self` given we know |
| 1839 | // this pointer is valid valid and the returned lifetime is connected |
| 1840 | // to `self` so that should also be valid. |
| 1841 | unsafe { self.instance.as_non_null().as_ref() } |
| 1842 | } |
| 1843 | |
| 1844 | /// Same as [`Self::get`] except for mutability. |
| 1845 | pub fn get_mut(&mut self) -> Pin<&mut T> { |
no test coverage detected