pub struct JClass<'local>(/* private fields */);
Expand description
Lifetime’d representation of a jclass
. Just a JObject
wrapped in a new
class.
Implementations§
Source§impl<'local> JClass<'local>
impl<'local> JClass<'local>
Sourcepub unsafe fn from_raw(raw: *mut _jobject) -> JClass<'local>
pub unsafe fn from_raw(raw: *mut _jobject) -> JClass<'local>
Creates a JClass
that wraps the given raw
jclass
§Safety
raw
may be a null pointer. If raw
is not a null pointer, then:
raw
must be a valid raw JNI local reference.- There must not be any other
JObject
representing the same local reference. - The lifetime
'local
must not outlive the local reference frame that the local reference was created in.
Trait Implementations§
Source§impl<'local, 'obj_ref> Desc<'local, JClass<'static>> for &'obj_ref GlobalRef
impl<'local, 'obj_ref> Desc<'local, JClass<'static>> for &'obj_ref GlobalRef
This conversion assumes that the GlobalRef
is a pointer to a class object.
Source§impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JClass<'local>
impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JClass<'local>
This conversion assumes that the JObject
is a pointer to a class object.
Auto Trait Implementations§
impl<'local> Freeze for JClass<'local>
impl<'local> RefUnwindSafe for JClass<'local>
impl<'local> Send for JClass<'local>where
'local: 'static,
impl<'local> Sync for JClass<'local>where
'local: 'static,
impl<'local> Unpin for JClass<'local>
impl<'local> UnwindSafe for JClass<'local>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more