#[non_exhaustive]pub enum GroupState {
Unknown,
PreparingRebalance,
CompletingRebalance,
Stable,
Dead,
Empty,
Assigning,
Reconciling,
NotReady,
}Expand description
The group state.
The following table shows the correspondence between the group states and types.
| State | Classic group | Consumer group | Share group | Streams group |
|---|---|---|---|---|
| UNKNOWN | Yes | Yes | Yes | Yes |
| PREPARING_REBALANCE | Yes | Yes | ||
| COMPLETING_REBALANCE | Yes | Yes | ||
| STABLE | Yes | Yes | Yes | Yes |
| DEAD | Yes | Yes | Yes | Yes |
| EMPTY | Yes | Yes | Yes | Yes |
| ASSIGNING | Yes | Yes | ||
| RECONCILING | Yes | Yes | ||
| NOT_READY | Yes |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
An unrecognized group state (e.g. a state newer than this client).
PreparingRebalance
The group is preparing to rebalance.
CompletingRebalance
The group is completing a rebalance.
Stable
The group is stable.
Dead
The group is dead.
Empty
The group is empty.
Assigning
The group is assigning (consumer/streams groups only).
Reconciling
The group is reconciling (consumer/streams groups only).
NotReady
The group is not ready (streams groups only).
Implementations§
Source§impl GroupState
impl GroupState
Sourcepub fn group_states_for_type(group_type: GroupType) -> HashSet<GroupState>
pub fn group_states_for_type(group_type: GroupType) -> HashSet<GroupState>
Returns the set of group states applicable to the given group type.
§Arguments
group_type- the group type
§Panics
Panics with Group type not known if group_type is
GroupType::Unknown, where Java throws
IllegalArgumentException("Group type not known"). A group listing reports Unknown for a type
this client does not know, such as one a newer broker added, so check
for it before calling. The lookup otherwise always succeeds, so its
signature stays a plain HashSet.
Trait Implementations§
Source§impl Clone for GroupState
impl Clone for GroupState
Source§fn clone(&self) -> GroupState
fn clone(&self) -> GroupState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroupState
impl Debug for GroupState
Source§impl Display for GroupState
Java’s toString(), which returns the private name field: the text
(PreparingRebalance) the broker sends and GroupState::parse reads, not
the constant name GroupState::name returns (the constants of GroupState).
impl Display for GroupState
Java’s toString(), which returns the private name field: the text
(PreparingRebalance) the broker sends and GroupState::parse reads, not
the constant name GroupState::name returns (the constants of GroupState).
Source§impl Hash for GroupState
impl Hash for GroupState
Source§impl Ord for GroupState
impl Ord for GroupState
Source§fn cmp(&self, other: &GroupState) -> Ordering
fn cmp(&self, other: &GroupState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for GroupState
impl PartialEq for GroupState
Source§impl PartialOrd for GroupState
impl PartialOrd for GroupState
impl Copy for GroupState
impl Eq for GroupState
impl StructuralPartialEq for GroupState
Auto Trait Implementations§
impl Freeze for GroupState
impl RefUnwindSafe for GroupState
impl Send for GroupState
impl Sync for GroupState
impl Unpin for GroupState
impl UnsafeUnpin for GroupState
impl UnwindSafe for GroupState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.