triggerRustPanic

Trigger a panic inside the Rust code.

This function simulates the occurrence of an unexpected state inside the Rust code that causes it to panic. We build our Rust components to unwind on panic, so after calling this function through the foreign language bindings, you should expect it to intercept the panic translate it into some foreign-language-appropriate equivalent:

  • In Kotlin, it will throw an exception.

  • In Swift, it will fail with a try! runtime error.