pub struct JPollResult<'a: 'b, 'b> { /* private fields */ }
Expand description
Wrapper for JObject
s that implement
io.github.gedgygedgy.rust.task.PollResult
. Provides method to get the
poll result.
Looks up the class and method IDs on creation rather than for every method call.
Implementations§
Source§impl<'a: 'b, 'b> JPollResult<'a, 'b>
impl<'a: 'b, 'b> JPollResult<'a, 'b>
Sourcepub fn from_env(env: &'b JNIEnv<'a>, obj: JObject<'a>) -> Result<Self>
pub fn from_env(env: &'b JNIEnv<'a>, obj: JObject<'a>) -> Result<Self>
Create a JPollResult
from the environment and an object. This looks
up the necessary class and method IDs to call all of the methods on it
so that extra work doesn’t need to be done on every method call.
§Arguments
env
- Java environment to use.obj
- Object to wrap.
Sourcepub fn get(&self) -> Result<JObject<'a>>
pub fn get(&self) -> Result<JObject<'a>>
Gets the object associated with the JPollResult
by calling
io.github.gedgygedgy.rust.task.PollResult.get()
. Can throw an
exception.
Trait Implementations§
Source§impl<'a: 'b, 'b> Deref for JPollResult<'a, 'b>
impl<'a: 'b, 'b> Deref for JPollResult<'a, 'b>
Source§impl<'a: 'b, 'b> From<JPollResult<'a, 'b>> for JObject<'a>
impl<'a: 'b, 'b> From<JPollResult<'a, 'b>> for JObject<'a>
Source§fn from(other: JPollResult<'a, 'b>) -> JObject<'a>
fn from(other: JPollResult<'a, 'b>) -> JObject<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, 'b> Freeze for JPollResult<'a, 'b>
impl<'a, 'b> RefUnwindSafe for JPollResult<'a, 'b>
impl<'a, 'b> !Send for JPollResult<'a, 'b>
impl<'a, 'b> !Sync for JPollResult<'a, 'b>
impl<'a, 'b> Unpin for JPollResult<'a, 'b>
impl<'a, 'b> UnwindSafe for JPollResult<'a, 'b>
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