Skip to content

Add CGDataProvider initializers #732

@madsmtm

Description

@madsmtm

core-graphics has several functions for initializing CGDataProvider, see the source (not actually exposed, since the type is #[doc(hidden)] for some reason). See also upstream issue servo/core-foundation-rs#185.

It might be desirable to provide similar functionality in objc2-core-graphics, though it's a bit difficult to choose the correct abstraction; do we take &'static [u8], Box<[u8]>, Vec<[u8]> or Arc<[u8]>? Inside smart pointers, do we accept any impl AsRef<u8> + Send + Sync + 'static? Do we provide from_slice_unchecked?

We could of course do all of these, but I'd like to know whether the demand is high enough to be worth it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frameworkAffects the framework crates and the translator for themenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions