pub fn emit<S: Serialize + Clone>(
    &self,
    event: impl AsRef<str>,
    payload: Option<S>,
  ) -> crate::Result<()> {
    for dispatcher in self.dispatchers.lock().unwrap().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 fn emit<S: Serialize + Clone>(
    &self,
    event: impl AsRef<str>,
    payload: Option<S>,
  ) -> crate::Result<()> {
    for dispatcher in self.dispatchers.lock().unwrap().values() {
      super::event::emit(&dispatcher, event.as_ref(), payload.clone())?;
    }
    Ok(())
  }
pub fn emit < S : Serialize + Clone > ( & self , event : impl AsRef < str > , payload : Option < S > , ) -> crate :: Result < ( ) > { for dispatcher in self . dispatchers . lock ( ) . unwrap ( ) . 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>