pub unsafe fn data_ref<'a, T, N>(&self, name: N) -> Result<&'a T, NulError>
    where
        N: Into<Vec<u8>>,
    {
        Ok(self.data_ref_cstr(&CString::new(name)?))
    }
/// Returns a reference to the capsule data.
///
/// The name must match exactly the one given at capsule creation time (see `new_data`) and
/// is converted to a C string under the hood. If that's too much overhead, consider using
/// `data_ref_cstr()` or caching strategies.
///
/// This is unsafe, because
/// - nothing guarantees that the `T` type is appropriate for the data referenced by the capsule
///   pointer
/// - the returned lifetime doesn't guarantee either to cover the actual lifetime of the data
///   (although capsule data is usually static)
///
/// # Errors
/// This method returns `NulError` if `name` contains a 0 byte (see also `CString::new`)
Returns a reference to the capsule data.
The name must match exactly the one given at capsule creation time  and
is converted to a C string under the hood. If that's too much overhead, consider using
`data_ref_cstr()` or caching strategies.

This is unsafe, because
nothing guarantees that the `T` type is appropriate for the data referenced by the capsule
pointer
the returned lifetime doesn't guarantee either to cover the actual lifetime of the data
(although capsule data is usually static)
Returns a reference to the capsule data . The name must match exactly the one given at capsule creation time and is converted to a C string under the hood . If that ' s too much overhead consider using ` data_ref_cstr () ` or caching strategies . This is unsafe because nothing guarantees that the ` T ` type is appropriate for the data referenced by the capsule pointer the returned lifetime doesn ' t guarantee either to cover the actual lifetime of the data ( although capsule data is usually static )
pub unsafe fn data_ref<'a, T, N>(&self, name: N) -> Result<&'a T, NulError>
    where
        N: Into<Vec<u8>>,
    {
        Ok(self.data_ref_cstr(&CString::new(name)?))
    }
pub unsafe fn data_ref < ' a , T , N > ( & self , name : N ) -> Result < & ' a T , NulError > where N : Into < Vec < u8 > > , { Ok ( self . data_ref_cstr ( & CString :: new ( name ) ? ) ) }
Returns a reference to the capsule data.
Returns a reference to the capsule data .
&self
name
N
&self
name
N
errors
This method returns `NulError` if `name` contains a 0 byte
This method returns ` NulError ` if ` name ` contains a 0 byte