pub struct JObject<'a> { /* private fields */ }
Expand description
Wrapper around sys::jobject
that adds a lifetime. This prevents it from
outliving the context in which it was acquired and getting GC’d out from
under us. It matches C’s representation of the raw pointer, so it can be
used in any of the extern function argument positions that would take a
jobject
.
Most other types in the objects
module deref to this, as they do in the C
representation.
Implementations§
Trait Implementations§
Source§impl<'a> AutoDeallocateBuilder<'a, JObject<'a>> for MutAutoDeallocateObjectArrayBuilder<jobject>
impl<'a> AutoDeallocateBuilder<'a, JObject<'a>> for MutAutoDeallocateObjectArrayBuilder<jobject>
Source§impl<'a> From<JByteBuffer<'a>> for JObject<'a>
impl<'a> From<JByteBuffer<'a>> for JObject<'a>
Source§fn from(other: JByteBuffer<'_>) -> JObject<'_>
fn from(other: JByteBuffer<'_>) -> JObject<'_>
Converts to this type from the input type.
Source§impl<'a> From<JObject<'a>> for JByteBuffer<'a>
impl<'a> From<JObject<'a>> for JByteBuffer<'a>
Source§fn from(other: JObject<'_>) -> JByteBuffer<'_>
fn from(other: JObject<'_>) -> JByteBuffer<'_>
Converts to this type from the input type.
Source§impl<'a> From<JObject<'a>> for JClass<'a>
This conversion assumes that the JObject
is a pointer to a class object.
impl<'a> From<JObject<'a>> for JClass<'a>
This conversion assumes that the JObject
is a pointer to a class object.
Source§impl<'a> From<JObject<'a>> for JThrowable<'a>
impl<'a> From<JObject<'a>> for JThrowable<'a>
Source§fn from(other: JObject<'_>) -> JThrowable<'_>
fn from(other: JObject<'_>) -> JThrowable<'_>
Converts to this type from the input type.
Source§impl<'a> From<JThrowable<'a>> for JObject<'a>
impl<'a> From<JThrowable<'a>> for JObject<'a>
Source§fn from(other: JThrowable<'_>) -> JObject<'_>
fn from(other: JThrowable<'_>) -> JObject<'_>
Converts to this type from the input type.
impl<'a> Copy for JObject<'a>
Auto Trait Implementations§
impl<'a> Freeze for JObject<'a>
impl<'a> RefUnwindSafe for JObject<'a>
impl<'a> !Send for JObject<'a>
impl<'a> !Sync for JObject<'a>
impl<'a> Unpin for JObject<'a>
impl<'a> UnwindSafe for JObject<'a>
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