pub fn execute_mod_async(
    self,
    js_url: &Url,
    is_prefetch: bool,
  ) -> impl Future<Item = Self, Error = (RustOrJsError, Self)> {
    let recursive_load = deno::RecursiveLoad::new(js_url.as_str(), self);
    recursive_load.and_then(
      move |(id, mut self_)| -> Result<Self, (deno::JSErrorOr<DenoError>, Self)> {
        if is_prefetch {
          Ok(self_)
        } else {
          let result = self_.inner.mod_evaluate(id);
          if let Err(err) = result {
            Err((deno::JSErrorOr::JSError(err), self_))
          } else {
            Ok(self_)
          }
        }
      },
    )
    .map_err(|(err, self_)| {
      // Convert to RustOrJsError AND apply_source_map.
      let err = match err {
        deno::JSErrorOr::JSError(err) => RustOrJsError::Js(self_.apply_source_map(err)),
        deno::JSErrorOr::Other(err) => RustOrJsError::Rust(err),
      };
      (err, self_)
    })
  }
/// Consumes worker. Executes the provided JavaScript module.
Consumes worker. Executes the provided JavaScript module.
Consumes worker . Executes the provided JavaScript module .
pub fn execute_mod_async(
    self,
    js_url: &Url,
    is_prefetch: bool,
  ) -> impl Future<Item = Self, Error = (RustOrJsError, Self)> {
    let recursive_load = deno::RecursiveLoad::new(js_url.as_str(), self);
    recursive_load.and_then(
      move |(id, mut self_)| -> Result<Self, (deno::JSErrorOr<DenoError>, Self)> {
        if is_prefetch {
          Ok(self_)
        } else {
          let result = self_.inner.mod_evaluate(id);
          if let Err(err) = result {
            Err((deno::JSErrorOr::JSError(err), self_))
          } else {
            Ok(self_)
          }
        }
      },
    )
    .map_err(|(err, self_)| {
      // Convert to RustOrJsError AND apply_source_map.
      let err = match err {
        deno::JSErrorOr::JSError(err) => RustOrJsError::Js(self_.apply_source_map(err)),
        deno::JSErrorOr::Other(err) => RustOrJsError::Rust(err),
      };
      (err, self_)
    })
  }
pub fn execute_mod_async ( self , js_url : & Url , is_prefetch : bool , ) -> impl Future < Item = Self , Error = ( RustOrJsError , Self ) > { let recursive_load = deno :: RecursiveLoad :: new ( js_url . as_str ( ) , self ) ; recursive_load . and_then ( move | ( id , mut self_ ) | -> Result < Self , ( deno :: JSErrorOr < DenoError > , Self ) > { if is_prefetch { Ok ( self_ ) } else { let result = self_ . inner . mod_evaluate ( id ) ; if let Err ( err ) = result { Err ( ( deno :: JSErrorOr :: JSError ( err ) , self_ ) ) } else { Ok ( self_ ) } } } , ) . map_err ( | ( err , self_ ) | { // Convert to RustOrJsError AND apply_source_map. let err = match err { deno :: JSErrorOr :: JSError ( err ) => RustOrJsError :: Js ( self_ . apply_source_map ( err ) ) , deno :: JSErrorOr :: Other ( err ) => RustOrJsError :: Rust ( err ) , } ; ( err , self_ ) } ) }
Consumes worker.
Consumes worker .
self
js_url
&Url
is_prefetch
bool