Convenience method to create a capsule for some data The encapsuled data may be an array of functions, but it can't be itself a function directly. May panic when running out of memory.
(py: Python, data: &'static T, name: N)
| 555 | /// May panic when running out of memory. |
| 556 | /// |
| 557 | pub fn new_data<T, N>(py: Python, data: &'static T, name: N) -> Result<Self, NulError> |
| 558 | where |
| 559 | N: Into<Vec<u8>>, |
| 560 | { |
| 561 | Self::new(py, data as *const T as *const c_void, name) |
| 562 | } |
| 563 | |
| 564 | /// Creates a new capsule from a raw void pointer |
| 565 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected