pub fn new_data<T, N>(py: Python, data: &'static T, name: N) -> Result<Self, NulError>
    where
        N: Into<Vec<u8>>,
    {
        Self::new(py, data as *const T as *const c_void, name)
    }
/// 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.
///
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.
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 .
pub fn new_data<T, N>(py: Python, data: &'static T, name: N) -> Result<Self, NulError>
    where
        N: Into<Vec<u8>>,
    {
        Self::new(py, data as *const T as *const c_void, name)
    }
pub fn new_data < T , N > ( py : Python , data : & ' static T , name : N ) -> Result < Self , NulError > where N : Into < Vec < u8 > > , { Self :: new ( py , data as * const T as * const c_void , name ) }
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.
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 .
py
Python
data
&'static T
name
N
py
Python
data
&'static T
name
N