MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / try_from

Method try_from

rust/src/api/instance.rs:98–101  ·  view source on GitHub ↗
(invocation_arg: InvocationArg)

Source from the content-addressed store, hash-verified

96impl TryFrom<InvocationArg> for Instance {
97 type Error = errors::J4RsError;
98 fn try_from(invocation_arg: InvocationArg) -> errors::Result<Instance> {
99 let obj = invocation_arg.as_java_ptr_with_local_ref(cache::get_thread_local_env()?)?;
100 Instance::new(obj, invocation_arg.class_name())
101 }
102}
103
104impl TryFrom<jobject> for Instance {

Callers

nothing calls this directly

Calls 3

get_thread_local_envFunction · 0.85
class_nameMethod · 0.45

Tested by

no test coverage detected