Trait FutureExtJava

Source
pub trait FutureExtJava: FutureExt {
    // Provided methods
    fn map_java<'a: 'b, 'b, E, F>(
        self,
        env: &'b JNIEnv<'a>,
        f: F,
    ) -> Box<dyn Future<Output = Result<GlobalRef, E>> + Send + 'static>
       where Self: Sized + Send + 'static,
             E: From<JError> + Send + Display + 'static,
             F: Send + 'static + for<'k> FnOnce(&'k JNIEnv<'k>, Self::Output) -> Result<JObject<'k>, E> { ... }
    fn map_ok_java<'a: 'b, 'b, T, E, F>(
        self,
        env: &'b JNIEnv<'a>,
        f: F,
    ) -> Box<dyn Future<Output = Result<GlobalRef, E>> + Send + 'static>
       where Self: Sized + Send + 'static + Future<Output = Result<T, E>>,
             E: Error + Send + Display + 'static + From<GlobalError>,
             F: Send + 'static + for<'k> FnOnce(&'k JNIEnv<'k>, T) -> Result<JObject<'k>, CompositeError<E>> { ... }
}

Provided Methods§

Source

fn map_java<'a: 'b, 'b, E, F>( self, env: &'b JNIEnv<'a>, f: F, ) -> Box<dyn Future<Output = Result<GlobalRef, E>> + Send + 'static>
where Self: Sized + Send + 'static, E: From<JError> + Send + Display + 'static, F: Send + 'static + for<'k> FnOnce(&'k JNIEnv<'k>, Self::Output) -> Result<JObject<'k>, E>,

Source

fn map_ok_java<'a: 'b, 'b, T, E, F>( self, env: &'b JNIEnv<'a>, f: F, ) -> Box<dyn Future<Output = Result<GlobalRef, E>> + Send + 'static>
where Self: Sized + Send + 'static + Future<Output = Result<T, E>>, E: Error + Send + Display + 'static + From<GlobalError>, F: Send + 'static + for<'k> FnOnce(&'k JNIEnv<'k>, T) -> Result<JObject<'k>, CompositeError<E>>,

Implementors§

Source§

impl<F> FutureExtJava for F
where F: FutureExt,