Crate java_spaghetti

Source
Expand description

Common glue code between Rust and JNI, used in autogenerated java-spaghetti glue code.

See also the Android JNI tips documentation as well as the Java Native Interface Specification.

Re-exports§

pub use ::jni_sys as sys;

Structs§

Arg
FFI: Use Arg<java::lang::Object> instead of jobject. This represents a (null?) function argument.
BooleanArray
A PrimitiveArray implementation.
ByteArray
A PrimitiveArray implementation.
CastError
Error returned on failed .cast().`
CharArray
A PrimitiveArray implementation.
DoubleArray
A PrimitiveArray implementation.
Env
FFI: Use Env instead of *const JNIEnv. This represents a per-thread Java exection environment.
FloatArray
A PrimitiveArray implementation.
Global
A Global, non-null, reference to a Java object (+ VM).
IntArray
A PrimitiveArray implementation.
Local
A Local, non-null, reference to a Java object (+ Env) limited to the current thread/stack.
LongArray
A PrimitiveArray implementation.
Null
ObjectArray
A Java Array of reference types (classes, interfaces, other arrays, etc.)
ObjectArrayIter
Ref
A non-null, reference to a Java object (+ Env). This may refer to a Local, Global, local Arg, etc.
Return
FFI: Use Return<java::lang::Object> instead of jobject. This represents a (null?) JNI function call return value.
ShortArray
A PrimitiveArray implementation.
StringChars
Represents an env.GetStringChars + env.GetStringLength query. Will automatically env.ReleaseStringChars when dropped.
VM
FFI: Use &VM instead of *const JavaVM. This represents a global, process-wide Java exection environment.

Traits§

AsArg
AssignableTo
Marker trait indicating Self can be assigned to T.
JniType
JNI bindings rely on this type being accurate.
PrimitiveArray
A Java Array of some POD-like type such as bool, jbyte, jchar, jshort, jint, jlong, jfloat, or jdouble.
ThrowableType
A marker type indicating this is a valid exception type that all exceptions thrown by java should be compatible with