pub enum WakeStrategy {
Poll {
interval: Duration,
},
Notify(Arc<RwLock<HashMap<String, Arc<Notify>>>>),
}Expand description
Strategy for waking consumers when new events arrive
Variants§
Poll
Poll periodically for new events
Notify(Arc<RwLock<HashMap<String, Arc<Notify>>>>)
Use async notifications (tokio::sync::Notify)
Implementations§
Source§impl WakeStrategy
impl WakeStrategy
Sourcepub fn notify_stream(&self, stream: &str)
pub fn notify_stream(&self, stream: &str)
Notify all consumers waiting on a stream
This is a no-op for Poll strategy.
Sourcepub fn notify_all(&self)
pub fn notify_all(&self)
Notify all consumers on all streams
This is a no-op for Poll strategy.
Trait Implementations§
Source§impl Clone for WakeStrategy
impl Clone for WakeStrategy
Source§fn clone(&self) -> WakeStrategy
fn clone(&self) -> WakeStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WakeStrategy
impl RefUnwindSafe for WakeStrategy
impl Send for WakeStrategy
impl Sync for WakeStrategy
impl Unpin for WakeStrategy
impl UnwindSafe for WakeStrategy
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