Skip to main content

LogHandlerBlock

Type Alias LogHandlerBlock 

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

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

Used for log handlers: void (^)(NS::String*, NS::String*, LogLevel, NS::String*) LogLevel in Metal is NS::Integer (isize on 64-bit platforms).

Aliased Type§

pub struct LogHandlerBlock { /* private fields */ }

Implementations§

Source§

impl LogHandlerBlock

Source

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

Create a block for log handling.

The closure receives (subsystem, category, level, message).