Skip to main content

ThreeArgBlock

Type Alias ThreeArgBlock 

Source
pub type ThreeArgBlock = RcBlock<Box<dyn Fn(*mut c_void, *mut c_void, *mut c_void) + Send>>;
Expand description

Block type: void (^)(id, id, id)

Used for completion handlers with reflection: void (^)(MTL::RenderPipelineState*, MTL::RenderPipelineReflection*, NS::Error*)

Aliased Type§

pub struct ThreeArgBlock { /* private fields */ }

Implementations§

Source§

impl ThreeArgBlock

Source

pub fn from_fn<F>(f: F) -> Self
where F: Fn(*mut c_void, *mut c_void, *mut c_void) + Send + 'static,

Create a block from a closure taking three pointer arguments.

This matches the C++ pattern:

using NewRenderPipelineStateWithReflectionCompletionHandler =
    void (^)(MTL::RenderPipelineState*, MTL::RenderPipelineReflection*, NS::Error*);