pub struct EventBus { /* private fields */ }Expand description
The main event bus for the system
Implementations§
Source§impl EventBus
impl EventBus
Sourcepub fn subscribe_topology(&self) -> Subscription<TopologyEvent>
pub fn subscribe_topology(&self) -> Subscription<TopologyEvent>
Subscribe to topology events
Sourcepub async fn publish_topology(&self, event: TopologyEvent) -> Result<()>
pub async fn publish_topology(&self, event: TopologyEvent) -> Result<()>
Publish a topology event
Sourcepub async fn subscribe_dht_key(&self, key: Key) -> Subscription<Bytes>
pub async fn subscribe_dht_key(&self, key: Key) -> Subscription<Bytes>
Subscribe to DHT key watches
Sourcepub async fn publish_dht_update(&self, key: Key, value: Bytes) -> Result<()>
pub async fn publish_dht_update(&self, key: Key, value: Bytes) -> Result<()>
Publish a DHT key update
Sourcepub async fn subscribe_forwards(
&self,
identity_key: Key,
) -> Subscription<Forward>
pub async fn subscribe_forwards( &self, identity_key: Key, ) -> Subscription<Forward>
Subscribe to forward announcements for an identity
Sourcepub async fn publish_forward_for(
&self,
identity_key: Key,
forward: Forward,
) -> Result<()>
pub async fn publish_forward_for( &self, identity_key: Key, forward: Forward, ) -> Result<()>
Publish a forward announcement scoped to identity
Sourcepub async fn cleanup_expired(&self)
pub async fn cleanup_expired(&self)
Clean up expired subscriptions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventBus
impl !RefUnwindSafe for EventBus
impl Send for EventBus
impl Sync for EventBus
impl Unpin for EventBus
impl !UnwindSafe for EventBus
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