Skip to main content

SubscriptionCache

Trait SubscriptionCache 

Source
pub trait SubscriptionCache {
    // Required method
    fn next_publish_time(&mut self, set_last_publish: bool) -> Option<Instant>;
}
Expand description

A trait for managing subscription state in the event loop.

This is just a handle to something that track subscriptions, letting us query when the next publish should be sent.

Required Methods§

Source

fn next_publish_time(&mut self, set_last_publish: bool) -> Option<Instant>

Get and update the time for the next publish. If set_last_publish is true, the last publish time is updated to now, affecting future calls to this method.

Implementors§