Struct crabdroid::ContextedGlobal
source · pub struct ContextedGlobal { /* private fields */ }
Expand description
GlobalRef along with it’s VM. Mainly to be used for thread traveling of objects.
Implementations§
source§impl ContextedGlobal
impl ContextedGlobal
pub fn from_local(env: &JNIEnv<'_>, local: JObject<'_>) -> Result<Self>
pub fn do_in_context_jret<'a: 'b, 'b, F>( &'a self, capacity: i32, f: F ) -> Result<ContextedGlobal>
pub fn bind_locally<'a: 'b, 'b>( &self, env: &'b JNIEnv<'a> ) -> Result<JObject<'a>>
pub fn do_in_context_rret<F, R>(&self, capacity: i32, f: F) -> Result<R>
pub fn with_safe_context_rret<F, R>( &self, capacity: i32, f: F ) -> GlobalResult<R>
pub async fn with_async_context<F>( &self, capacity: i32, f: F ) -> GlobalResult<ContextedGlobal>
Trait Implementations§
source§impl Clone for ContextedGlobal
impl Clone for ContextedGlobal
source§fn clone(&self) -> ContextedGlobal
fn clone(&self) -> ContextedGlobal
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ContextedGlobal
impl Debug for ContextedGlobal
source§impl<'a: 'b, 'b> From<JCompletableFuture<'a, 'b>> for ContextedGlobal
impl<'a: 'b, 'b> From<JCompletableFuture<'a, 'b>> for ContextedGlobal
source§fn from(other: JCompletableFuture<'a, 'b>) -> ContextedGlobal
fn from(other: JCompletableFuture<'a, 'b>) -> ContextedGlobal
Converts to this type from the input type.
source§impl<'a: 'b, 'b> From<JCompletionStage<'a, 'b>> for ContextedGlobal
impl<'a: 'b, 'b> From<JCompletionStage<'a, 'b>> for ContextedGlobal
source§fn from(other: JCompletionStage<'a, 'b>) -> ContextedGlobal
fn from(other: JCompletionStage<'a, 'b>) -> ContextedGlobal
Converts to this type from the input type.
Auto Trait Implementations§
impl CompositeErrorInclude for ContextedGlobal
impl RefUnwindSafe for ContextedGlobal
impl Send for ContextedGlobal
impl Sync for ContextedGlobal
impl Unpin for ContextedGlobal
impl UnwindSafe for ContextedGlobal
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