pub type OneArgBlock = RcBlock<Box<dyn Fn(*mut c_void) + Send>>;Expand description
Block type: void (^)(id)
Used for callbacks with one object argument (e.g., CommandBuffer handlers).
Aliased Type§
pub struct OneArgBlock { /* private fields */ }Implementations§
Source§impl OneArgBlock
impl OneArgBlock
Sourcepub fn from_fn_heap<F>(f: F) -> HeapOneArgBlock
pub fn from_fn_heap<F>(f: F) -> HeapOneArgBlock
Create a heap-allocated block from a closure taking one pointer argument.
Use this for blocks that need to outlive the current scope, such as completion handlers passed to Metal APIs.