[][src]Struct jnix::JnixEnv

pub struct JnixEnv<'env> { /* fields omitted */ }

Provides access to JNI functions.

Also provides an internal cache for loaded classes.

Methods

impl<'env> JnixEnv<'env>[src]

pub fn get_class<'a>(&self, class_name: impl Into<Cow<'a, str>>) -> GlobalRef[src]

Retrieves a global reference to a Class object.

Tries to retrieve it from the class cache. If it's not present in the cache, it is loaded into the cache first.

Panics

This method will panic if the class can't be loaded or if a global reference can't be obtained to the Class object.

pub fn preload_classes(
    &self,
    class_names: impl IntoIterator<Item = impl Into<String>>
)
[src]

Loads a class and stores it in the class cache.

Trait Implementations

impl<'env> Deref for JnixEnv<'env>[src]

type Target = JNIEnv<'env>

The resulting type after dereferencing.

impl<'env> From<JNIEnv<'env>> for JnixEnv<'env>[src]

Auto Trait Implementations

impl<'env> RefUnwindSafe for JnixEnv<'env>

impl<'env> !Send for JnixEnv<'env>

impl<'env> !Sync for JnixEnv<'env>

impl<'env> Unpin for JnixEnv<'env>

impl<'env> UnwindSafe for JnixEnv<'env>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Desc<'a, T> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.