[−][src]Struct core_graphics::data_provider::CGDataProvider
Implementations
impl CGDataProvider
[src]
pub fn type_id() -> CFTypeID
[src]
pub fn from_buffer(buffer: Arc<Vec<u8>>) -> Self
[src]
Creates 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]
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_custom_data(custom_data: Box<Box<dyn CustomData>>) -> Self
[src]
Creates a data provider from the given raw pointer, length, and destructor function.
This is double-boxed because the Core Text API requires that the userdata be a single pointer.
Methods from Deref<Target = CGDataProviderRef>
pub fn copy_data(&self) -> CFData
[src]
Creates a copy of the data from the underlying CFDataProviderRef
.
Trait Implementations
impl AsRef<CGDataProviderRef> for CGDataProvider
[src]
fn as_ref(&self) -> &CGDataProviderRef
[src]
impl Borrow<CGDataProviderRef> for CGDataProvider
[src]
fn borrow(&self) -> &CGDataProviderRef
[src]
impl Clone for CGDataProvider
[src]
fn clone(&self) -> CGDataProvider
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Deref for CGDataProvider
[src]
type Target = CGDataProviderRef
The resulting type after dereferencing.
fn deref(&self) -> &CGDataProviderRef
[src]
impl DerefMut for CGDataProvider
[src]
fn deref_mut(&mut self) -> &mut CGDataProviderRef
[src]
impl Drop for CGDataProvider
[src]
Auto Trait Implementations
impl RefUnwindSafe for CGDataProvider
impl !Send for CGDataProvider
impl !Sync for CGDataProvider
impl Unpin for CGDataProvider
impl UnwindSafe for CGDataProvider
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,