pub trait Primitive{
type PrimitiveWrapper: Class;
// Required methods
fn to_primitive_wrapper(&self, e: &mut Env<'_>) -> Self::PrimitiveWrapper;
fn from_primitive_wrapper(
e: &mut Env<'_>,
w: Self::PrimitiveWrapper,
) -> Self;
fn from_jvalue_ref(jv: JValue<'_, '_>) -> Self;
fn from_jvalue(jv: JValueOwned<'_>) -> Self;
fn into_jvalue<'local>(self) -> JValueOwned<'local>;
}Expand description
Primitive java values that can be cheaply converted to / from JValue
and can be wrapped by an Object class.
Required Associated Types§
Sourcetype PrimitiveWrapper: Class
type PrimitiveWrapper: Class
The Object type that this type may be wrapped with
Required Methods§
Sourcefn to_primitive_wrapper(&self, e: &mut Env<'_>) -> Self::PrimitiveWrapper
fn to_primitive_wrapper(&self, e: &mut Env<'_>) -> Self::PrimitiveWrapper
Create a new instance of Self::PrimitiveWrapper from a copy of self
Sourcefn from_primitive_wrapper(e: &mut Env<'_>, w: Self::PrimitiveWrapper) -> Self
fn from_primitive_wrapper(e: &mut Env<'_>, w: Self::PrimitiveWrapper) -> Self
Perform the inverse conversion, yielding Self from Self::PrimitiveWrapper
Sourcefn from_jvalue_ref(jv: JValue<'_, '_>) -> Self
fn from_jvalue_ref(jv: JValue<'_, '_>) -> Self
Convert a local JValue reference to Self
Sourcefn from_jvalue(jv: JValueOwned<'_>) -> Self
fn from_jvalue(jv: JValueOwned<'_>) -> Self
Convert an owned local JValue to Self
Sourcefn into_jvalue<'local>(self) -> JValueOwned<'local>
fn into_jvalue<'local>(self) -> JValueOwned<'local>
Convert self to a JValue
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".