pub struct InMemorySignalBus { /* private fields */ }Expand description
In-memory signal bus using tokio broadcast channels
Suitable for desktop apps and testing (no external dependencies). Signals are best-effort and may be lost if no receivers are subscribed.
Implementations§
Trait Implementations§
Source§impl SignalBus for InMemorySignalBus
impl SignalBus for InMemorySignalBus
Source§fn emit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
signal: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn emit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
signal: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Emit a signal to a channel (best-effort, may be ignored)
Auto Trait Implementations§
impl Freeze for InMemorySignalBus
impl !RefUnwindSafe for InMemorySignalBus
impl Send for InMemorySignalBus
impl Sync for InMemorySignalBus
impl Unpin for InMemorySignalBus
impl UnsafeUnpin for InMemorySignalBus
impl !UnwindSafe for InMemorySignalBus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more