Skip to main content

Objects

Struct Objects 

Source
pub struct Objects<C> {
    pub classes: Vec<LoadedClass<C>>,
    pub objects: Vec<Instance>,
    pub jni: Option<usize>,
    /* private fields */
}
Expand description

The run unit’s classes and objects, the references to them, and the JNI environment once a program uses JNIENVPTR.

Fields§

§classes: Vec<LoadedClass<C>>§objects: Vec<Instance>§jni: Option<usize>

Implementations§

Source§

impl<C> Objects<C>

Source

pub fn find(&self, external: &str) -> Option<usize>

Source

pub fn object(&self, id: u32) -> Option<&Instance>

An object by its position plus one.

Source

pub fn add_object(&mut self, object: Instance) -> Result<u32, String>

Source

pub fn event(&mut self, text: String) -> u32

An event’s number, the same for the same words.

Source

pub fn told(&self, event: u32) -> &str

Source

pub fn local(&mut self, object: u32, made: u32) -> Result<u32, String>

A local reference in the innermost frame.

Source

pub fn local_in( &mut self, frame: u32, object: u32, made: u32, ) -> Result<u32, String>

A local reference in the frame with this serial.

Source

pub fn global(&mut self, object: u32, made: u32) -> Result<u32, String>

Source

pub fn push_frame(&mut self, pushed: bool) -> (usize, u32)

A new local frame, for a method’s invocation or PushLocalFrame: its depth and serial.

Source

pub fn pop_frames(&mut self, depth: usize, event: u32)

Pops the frame at depth and every frame above it, freeing their local references.

Source

pub fn pushed_frame(&self) -> Option<usize>

The depth of the innermost frame when PushLocalFrame pushed it.

Source

pub fn referent(&self, value: u32) -> Referent

Source

pub fn is_global(&self, value: u32) -> bool

Source

pub fn free(&mut self, value: u32, event: u32)

Frees a valid reference, as DeleteLocalRef or DeleteGlobalRef does.

Trait Implementations§

Source§

impl<C> Default for Objects<C>

Source§

fn default() -> Objects<C>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<C> Freeze for Objects<C>
where Vec<LoadedClass<C>>: Freeze,

§

impl<C> RefUnwindSafe for Objects<C>

§

impl<C> Send for Objects<C>
where Vec<LoadedClass<C>>: Send,

§

impl<C> Sync for Objects<C>
where Vec<LoadedClass<C>>: Sync,

§

impl<C> Unpin for Objects<C>
where Vec<LoadedClass<C>>: Unpin,

§

impl<C> UnsafeUnpin for Objects<C>

§

impl<C> UnwindSafe for Objects<C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.