Retrieve the contents of a capsule pointing to some data as a reference. The retrieved data would typically be an array of static data and/or function pointers. This method doesn't work for standalone function pointers. # Safety This method is unsafe, because - nothing guarantees that the `T` type is appropriate for the data referenced by the capsule pointer - the returned lifetime doesn't guara
(py: Python, name: &CStr)
| 529 | /// - the returned lifetime doesn't guarantee either to cover the actual lifetime of the data |
| 530 | /// (although capsule data is usually static) |
| 531 | pub unsafe fn import_data<'a, T>(py: Python, name: &CStr) -> PyResult<&'a T> { |
| 532 | Ok(&*(Self::import(py, name)? as *const T)) |
| 533 | } |
| 534 | |
| 535 | /// Retrieves the contents of a capsule as a void pointer by its name. |
| 536 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected