pub trait CrossTabChannel: Send + Sync {
// Required methods
fn send_message<'life0, 'async_trait>(
&'life0 self,
message: CrossTabMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_message(&self, callback: Box<dyn Fn(CrossTabMessage) + Send + Sync>);
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Cross-tab communication channel
Required Methods§
Sourcefn send_message<'life0, 'async_trait>(
&'life0 self,
message: CrossTabMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_message<'life0, 'async_trait>(
&'life0 self,
message: CrossTabMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a message to other tabs
Sourcefn on_message(&self, callback: Box<dyn Fn(CrossTabMessage) + Send + Sync>)
fn on_message(&self, callback: Box<dyn Fn(CrossTabMessage) + Send + Sync>)
Register a message listener