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

Method new

rust/src/api/invocation_arg.rs:60–69  ·  view source on GitHub ↗

Creates a InvocationArg::Rust. This is default for the Args that are created from the Rust code.

(arg: &T, class_name: &str)

Source from the content-addressed store, hash-verified

58 /// Creates a InvocationArg::Rust.
59 /// This is default for the Args that are created from the Rust code.
60 pub fn new<T>(arg: &T, class_name: &str) -> InvocationArg
61 where
62 T: Serialize + Any,
63 {
64 Self::new_2(
65 arg,
66 class_name,
67 cache::get_thread_local_env().expect("Could not find the jni_env in the local cache. Please make sure that you created a Jvm before using Jvm::new"))
68 .expect("Could not create the InvocationArg. Please see the logs/console for more details.")
69 }
70
71 pub fn new_2<T>(
72 arg: &T,

Callers

nothing calls this directly

Calls 1

get_thread_local_envFunction · 0.85

Tested by

no test coverage detected