#[repr(C)]pub struct CGDataProvider { /* private fields */ }
Available on crate feature
CGDataProvider
only.Expand description
Implementations§
Source§impl CGDataProvider
impl CGDataProvider
pub unsafe fn new_sequential( info: *mut c_void, callbacks: *const CGDataProviderSequentialCallbacks, ) -> Option<CFRetained<CGDataProvider>>
Available on crate feature
libc
only.pub unsafe fn new_direct( info: *mut c_void, size: off_t, callbacks: *const CGDataProviderDirectCallbacks, ) -> Option<CFRetained<CGDataProvider>>
Available on crate feature
libc
only.Source§impl CGDataProvider
impl CGDataProvider
pub unsafe fn with_data( info: *mut c_void, data: *const c_void, size: usize, release_data: CGDataProviderReleaseDataCallback, ) -> Option<CFRetained<CGDataProvider>>
pub unsafe fn with_cf_data( data: Option<&CFData>, ) -> Option<CFRetained<CGDataProvider>>
pub unsafe fn with_url( url: Option<&CFURL>, ) -> Option<CFRetained<CGDataProvider>>
pub unsafe fn with_filename( filename: *const c_char, ) -> Option<CFRetained<CGDataProvider>>
pub unsafe fn data( provider: Option<&CGDataProvider>, ) -> Option<CFRetained<CFData>>
pub unsafe fn info(provider: Option<&CGDataProvider>) -> *mut c_void
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CGDataProvider
impl AsRef<AnyObject> for CGDataProvider
Source§impl AsRef<CFType> for CGDataProvider
impl AsRef<CFType> for CGDataProvider
Source§impl AsRef<CGDataProvider> for CGDataProvider
impl AsRef<CGDataProvider> for CGDataProvider
Source§impl Borrow<AnyObject> for CGDataProvider
impl Borrow<AnyObject> for CGDataProvider
Source§impl Borrow<CFType> for CGDataProvider
impl Borrow<CFType> for CGDataProvider
Source§impl ConcreteType for CGDataProvider
impl ConcreteType for CGDataProvider
Source§impl Debug for CGDataProvider
impl Debug for CGDataProvider
Source§impl Deref for CGDataProvider
impl Deref for CGDataProvider
Source§impl Hash for CGDataProvider
impl Hash for CGDataProvider
Source§impl Message for CGDataProvider
impl Message for CGDataProvider
Source§impl PartialEq for CGDataProvider
impl PartialEq for CGDataProvider
Source§impl RefEncode for CGDataProvider
impl RefEncode for CGDataProvider
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for CGDataProvider
impl Type for CGDataProvider
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for CGDataProvider
Auto Trait Implementations§
impl !Freeze for CGDataProvider
impl !RefUnwindSafe for CGDataProvider
impl !Send for CGDataProvider
impl !Sync for CGDataProvider
impl !Unpin for CGDataProvider
impl !UnwindSafe for CGDataProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more