Function std::intrinsics::try

source ·
pub unsafe extern "rust-intrinsic" fn try(
    try_fn: fn(_: *mut u8),
    data: *mut u8,
    catch_fn: fn(_: *mut u8, _: *mut u8)
) -> i32
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Rust’s “try catch” construct which invokes the function pointer try_fn with the data pointer data.

The third argument is a function called if a panic occurs. This function takes the data pointer and a pointer to the target-specific exception object that was caught. For more information see the compiler’s source as well as std’s catch implementation.