MCPcopy Create free account
hub / github.com/bluejekyll/wasmtime-java / attempt

Function attempt

wasmtime-jni/src/wasm_exception.rs:14–20  ·  view source on GitHub ↗
(env: &JNIEnv, f: F)

Source from the content-addressed store, hash-verified

12
13#[track_caller]
14pub fn attempt<R, F>(env: &JNIEnv, f: F) -> R
15where
16 R: Default,
17 F: FnOnce(&JNIEnv) -> Result<R, Error>,
18{
19 attempt_or_else(env, R::default, f)
20}
21
22#[track_caller]
23pub fn attempt_or_else<R, F, D>(env: &JNIEnv, or: D, f: F) -> R

Calls 1

attempt_or_elseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…