pub struct Subscription {
pub member_id: String,
pub topics: Vec<String>,
pub owned: Vec<TopicPartition>,
pub generation: i32,
}Expand description
One member’s declared interest, as it arrives in JoinGroup.
Fields§
§member_id: String§topics: Vec<String>Topics this member wants. Order is not significant; assignors sort.
owned: Vec<TopicPartition>What this member holds now, for assignors that try to keep it. Empty for the stateless strategies.
generation: i32The generation owned was true in, or -1 if the member did not say.
This is what makes an ownership claim trustworthy. A member that was
away still advertises the partitions it used to hold, and a leader that
believes it will hand the same partition to two members at once. Kafka
added the field to ConsumerProtocolSubscription v2 for exactly this,
and the rule every client applies is the same: a claim from below the
highest generation in the group is stale and is ignored.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Subscription
impl Debug for Subscription
impl Eq for Subscription
Source§impl PartialEq for Subscription
impl PartialEq for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.