Struct core_graphics::data_provider::CGDataProvider [−]
pub struct CGDataProvider(_);
Methods
impl CGDataProvider[src]
impl CGDataProviderpub fn type_id() -> CFTypeID[src]
pub fn type_id() -> CFTypeIDpub fn from_buffer(buffer: Arc<Vec<u8>>) -> Self[src]
pub fn from_buffer(buffer: Arc<Vec<u8>>) -> SelfCreates a data provider from the given reference-counted buffer.
The CGDataProvider object takes ownership of the reference. Once the data provider
is destroyed, the reference count of the buffer is automatically decremented.
pub unsafe fn from_slice(buffer: &[u8]) -> Self[src]
pub unsafe fn from_slice(buffer: &[u8]) -> SelfCreates 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.
Methods from Deref<Target = CGDataProviderRef>
pub fn copy_data(&self) -> CFData[src]
pub fn copy_data(&self) -> CFDataCreates a copy of the data from the underlying CFDataProviderRef.
Trait Implementations
impl Drop for CGDataProvider
impl Drop for CGDataProviderimpl Clone for CGDataProvider
impl Clone for CGDataProviderfn clone(&self) -> CGDataProvider
fn clone(&self) -> CGDataProviderReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Deref for CGDataProvider
impl Deref for CGDataProvidertype Target = CGDataProviderRef
The resulting type after dereferencing.
fn deref(&self) -> &CGDataProviderRef
fn deref(&self) -> &CGDataProviderRefDereferences the value.
impl DerefMut for CGDataProvider
impl DerefMut for CGDataProviderfn deref_mut(&mut self) -> &mut CGDataProviderRef
fn deref_mut(&mut self) -> &mut CGDataProviderRefMutably dereferences the value.
impl Borrow<CGDataProviderRef> for CGDataProvider
impl Borrow<CGDataProviderRef> for CGDataProviderfn borrow(&self) -> &CGDataProviderRef
fn borrow(&self) -> &CGDataProviderRefImmutably borrows from an owned value. Read more
impl AsRef<CGDataProviderRef> for CGDataProvider
impl AsRef<CGDataProviderRef> for CGDataProviderfn as_ref(&self) -> &CGDataProviderRef
fn as_ref(&self) -> &CGDataProviderRefPerforms the conversion.
Auto Trait Implementations
impl !Send for CGDataProvider
impl !Send for CGDataProviderimpl !Sync for CGDataProvider
impl !Sync for CGDataProvider