/// Runs the invoke handler if defined.
/// Returns whether the message was consumed or not.
/// The message is considered consumed if the handler exists and returns an Ok Result.
Runs the invoke handler if defined.
Returns whether the message was consumed or not.
The message is considered consumed if the handler exists and returns an Ok Result.
Runs the invoke handler if defined . Returns whether the message was consumed or not . The message is considered consumed if the handler exists and returns an Ok Result .
pub(crate) async fn run_invoke_handler(
    &self,
    dispatcher: &WebviewManager<A::Dispatcher>,
    arg: &str,
  ) -> crate::Result<bool> {
    if let Some(ref invoke_handler) = self.invoke_handler {
      let fut = invoke_handler(dispatcher.clone(), arg.to_string());
      fut.await.map(|_| true)
    } else {
      Ok(false)
    }
  }
pub ( crate ) async fn run_invoke_handler ( & self , dispatcher : & WebviewManager < A :: Dispatcher > , arg : & str , ) -> crate :: Result < bool > { if let Some ( ref invoke_handler ) = self . invoke_handler { let fut = invoke_handler ( dispatcher . clone ( ) , arg . to_string ( ) ) ; fut . await . map ( | _ | true ) } else { Ok ( false ) } }
Runs the invoke handler if defined.
Runs the invoke handler if defined .
&self
dispatcher
&WebviewManager<A::Dispatcher>
arg
&str