[−][src]Struct jni_glue::Global
A Global, non-null, reference to a Java object (+ &VM).
Unlike Local, this can be stored statically and shared between threads. This has a few caveats:
Not FFI Safe: #[repr(rust)], and exact layout is likely to change - depending on exact features used - in the future. Specifically, on Android, since we're guaranteed to only have a single ambient VM, we can likely store the *const JavaVM in static and/or thread local storage instead of lugging it around in every Local. Of course, there's no guarantee that's actually an optimization...
Methods
impl<Class: AsValidJObjectAndEnv> Global<Class>
[src]
pub fn with<'env>(&'env self, env: &'env Env) -> GlobalRef<'env, Class>
[src]
pub unsafe fn with_unchecked<'env>(
&'env self,
env: &'env Env
) -> GlobalRef<'env, Class>
[src]
&'env self,
env: &'env Env
) -> GlobalRef<'env, Class>
Trait Implementations
impl<Class: AsValidJObjectAndEnv> Sync for Global<Class>
[src]
impl<Class: AsValidJObjectAndEnv> Drop for Global<Class>
[src]
impl<Class: AsValidJObjectAndEnv> Send for Global<Class>
[src]
Auto Trait Implementations
impl<Class> Unpin for Global<Class> where
Class: Unpin,
Class: Unpin,
impl<Class> RefUnwindSafe for Global<Class> where
Class: RefUnwindSafe,
Class: RefUnwindSafe,
impl<Class> UnwindSafe for Global<Class> where
Class: UnwindSafe,
Class: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,