pub unsafe fn from_slice(buffer: &[u8]) -> Self {
        let ptr = buffer.as_ptr() as *const c_void;
        let len = buffer.len() as size_t;
        let result = CGDataProviderCreateWithData(ptr::null_mut(), ptr, len, None);
        CGDataProvider::from_ptr(result)
    }
/// Creates a data prvider from a given slice. The data provider does not own the slice in this
/// case, so it's up to the user to ensure the memory safety here.
Creates a data prvider from a given slice. The data provider does not own the slice in this
case, so it's up to the user to ensure the memory safety here.
Creates a data prvider from a given slice . The data provider does not own the slice in this case so it ' s up to the user to ensure the memory safety here .
pub unsafe fn from_slice(buffer: &[u8]) -> Self {
        let ptr = buffer.as_ptr() as *const c_void;
        let len = buffer.len() as size_t;
        let result = CGDataProviderCreateWithData(ptr::null_mut(), ptr, len, None);
        CGDataProvider::from_ptr(result)
    }
pub unsafe fn from_slice ( buffer : & [ u8 ] ) -> Self { let ptr = buffer . as_ptr ( ) as * const c_void ; let len = buffer . len ( ) as size_t ; let result = CGDataProviderCreateWithData ( ptr :: null_mut ( ) , ptr , len , None ) ; CGDataProvider :: from_ptr ( result ) }
Creates a data prvider from a given slice.
Creates a data prvider from a given slice .
buffer
&[u8]