pub enum TopicOverflow {
Backpressure,
Sliding,
Dropping,
}Expand description
Overflow policy for each Topic subscriber buffer.
Variants§
Backpressure
Preserve every element for every active subscriber.
publish(value).await waits until every subscriber in the publish
snapshot has capacity, then enqueues the element to all of them in the
topic’s global publish order. try_publish(value) returns
TopicTryPublishError::Full instead of waiting if any subscriber in
the snapshot is full.
Sliding
Keep the newest bounded window per subscriber.
When a subscriber buffer is full, publishing drops that subscriber’s oldest queued element and enqueues the new element. Other subscribers are unaffected. Publishers never wait for subscriber capacity under this policy.
Dropping
Drop new elements for slow subscribers.
When a subscriber buffer is full, the new element is skipped for that subscriber only. Other subscribers still receive it. Publishers never wait for subscriber capacity under this policy.
Trait Implementations§
Source§impl Clone for TopicOverflow
impl Clone for TopicOverflow
Source§fn clone(&self) -> TopicOverflow
fn clone(&self) -> TopicOverflow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TopicOverflow
Source§impl Debug for TopicOverflow
impl Debug for TopicOverflow
impl Eq for TopicOverflow
Source§impl PartialEq for TopicOverflow
impl PartialEq for TopicOverflow
Source§fn eq(&self, other: &TopicOverflow) -> bool
fn eq(&self, other: &TopicOverflow) -> bool
self and other values to be equal, and is used by ==.