pub async fn emit<S: Serialize + Clone>(
    &self,
    event: impl AsRef<str>,
    payload: Option<S>,
  ) -> crate::Result<()> {
    for dispatcher in self.dispatchers.lock().await.values() {
      super::event::emit(&dispatcher, event.as_ref(), payload.clone())?;
    }
    Ok(())
  }
/// Emits an event to all webviews.
Emits an event to all webviews.
Emits an event to all webviews .
pub async fn emit<S: Serialize + Clone>(
    &self,
    event: impl AsRef<str>,
    payload: Option<S>,
  ) -> crate::Result<()> {
    for dispatcher in self.dispatchers.lock().await.values() {
      super::event::emit(&dispatcher, event.as_ref(), payload.clone())?;
    }
    Ok(())
  }
pub async fn emit < S : Serialize + Clone > ( & self , event : impl AsRef < str > , payload : Option < S > , ) -> crate :: Result < ( ) > { for dispatcher in self . dispatchers . lock ( ) . await . values ( ) { super :: event :: emit ( & dispatcher , event . as_ref ( ) , payload . clone ( ) ) ? ; } Ok ( ( ) ) }
Emits an event to all webviews.
Emits an event to all webviews .
&self
event
impl AsRef<str>
payload
Option<S>
&self
event
impl AsRef<str>
payload
Option<S>