pub struct Group<K, T, E, F, S = RandomState> { /* private fields */ }Expand description
Namespace for duplicate suppression.
For a given key, only the leader computes. Duplicate callers subscribe to
the leader’s broadcast and receive the same Outcome.
Implementations§
Source§impl<K, T, E, F, Fut> Group<K, T, E, F, RandomState>
impl<K, T, E, F, Fut> Group<K, T, E, F, RandomState>
Source§impl<K, T, E, F, S> Group<K, T, E, F, S>
impl<K, T, E, F, S> Group<K, T, E, F, S>
pub fn with_hasher(op: F, hasher: S) -> Self
Source§impl<K, T, E, F, S> Group<K, T, E, F, S>
impl<K, T, E, F, S> Group<K, T, E, F, S>
Sourcepub fn entry(&self, key: K) -> Entry<K, T, E, S>
pub fn entry(&self, key: K) -> Entry<K, T, E, S>
Returns a leader for a new key, or a subscriber for an in-flight key.
Sourcepub async fn run<Fut>(&self, key: K) -> Arc<Outcome<T, E>> ⓘ
pub async fn run<Fut>(&self, key: K) -> Arc<Outcome<T, E>> ⓘ
Executes this group’s operation once per key while an earlier call is in flight.
pub fn in_flight(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<K, T, E, F, S> Freeze for Group<K, T, E, F, S>
impl<K, T, E, F, S> RefUnwindSafe for Group<K, T, E, F, S>where
F: RefUnwindSafe,
impl<K, T, E, F, S> Send for Group<K, T, E, F, S>
impl<K, T, E, F, S> Sync for Group<K, T, E, F, S>
impl<K, T, E, F, S> Unpin for Group<K, T, E, F, S>
impl<K, T, E, F, S> UnsafeUnpin for Group<K, T, E, F, S>
impl<K, T, E, F, S> UnwindSafe for Group<K, T, E, F, S>where
F: RefUnwindSafe,
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