pub type ARAAssertFunction = Option<unsafe extern "C" fn(category: ARAAssertCategory, problematicArgument: *const c_void, diagnosis: *const c_char)>;Expand description
! Global assert function pointer. ! The assert categories passed to the global assert function are useful both for guiding developers ! when debugging and for automatic assert evaluation when building unit tests. \br ! The diagnosis text is intended solely to aid the developer debugging an issue “from the ! other side”; they must not be presented to the user (or even parsed for flow control). ! If applicable (i.e. if the category is kARAAssertInvalidArgument), the diagnosis should contain ! a hint about what problematicArgument actually points to - for example if a struct is too small, ! you’d pass the pointer to the struct along with a diagnosis message a la: ! “someExampleInterfacePointer->structSize < kExampleStructMinSize”. ! Creating such appropriate texts automatically can be easily accomplished by custom assert macros. \br ! Finally, problematicArgument should point to the argument that contains the invalid data, so that ! the developer on that end can quickly identify the problem. If you can’t provide a meaningful ! address for it, e.g. because the category is kARAAssertInvalidThread, pass NULL here.
Aliased Type§
pub enum ARAAssertFunction {
None,
Some(unsafe extern "C" fn(i32, *const c_void, *const i8)),
}