pub struct MemberDescription { /* private fields */ }Expand description
A detailed description of a single group member in the cluster.
Implementations§
Source§impl MemberDescription
impl MemberDescription
Sourcepub fn new(
member_id: impl Into<String>,
group_instance_id: Option<String>,
rack_id: Option<String>,
client_id: impl Into<String>,
host: impl Into<String>,
assignment: MemberAssignment,
target_assignment: Option<MemberAssignment>,
member_epoch: Option<i32>,
upgraded: Option<bool>,
) -> Self
pub fn new( member_id: impl Into<String>, group_instance_id: Option<String>, rack_id: Option<String>, client_id: impl Into<String>, host: impl Into<String>, assignment: MemberAssignment, target_assignment: Option<MemberAssignment>, member_epoch: Option<i32>, upgraded: Option<bool>, ) -> Self
Creates a member description with all fields.
§Arguments
member_id- the consumer id of the group member.group_instance_id- the instance id of the group member, orNoneif not set.rack_id- the rack id of the group member, orNoneif not set.client_id- the client id of the group member.host- the host where the group member is running.assignment- the assignment of the group member.target_assignment- the target assignment of the member (consumer groups only).member_epoch- the epoch of the member (consumer groups only).upgraded- whether the member uses the consumer protocol (consumer groups only).
Sourcepub fn consumer_id(&self) -> &str
pub fn consumer_id(&self) -> &str
Returns the consumer id of the group member.
Sourcepub fn group_instance_id(&self) -> Option<&str>
pub fn group_instance_id(&self) -> Option<&str>
Returns the instance id of the group member.
Sourcepub fn rack_id(&self) -> Option<&str>
pub fn rack_id(&self) -> Option<&str>
Returns the rack id of the group member.
It is only available for consumer groups using the new consumer group protocol
(group.protocol=consumer).
Sourcepub fn assignment(&self) -> &MemberAssignment
pub fn assignment(&self) -> &MemberAssignment
Returns the assignment of the group member. Provided for both classic group and consumer group.
Sourcepub fn target_assignment(&self) -> Option<&MemberAssignment>
pub fn target_assignment(&self) -> Option<&MemberAssignment>
Returns the target assignment of the member (consumer groups only).
Sourcepub fn member_epoch(&self) -> Option<i32>
pub fn member_epoch(&self) -> Option<i32>
Returns the epoch of the group member. The optional is set to an integer if the member is
in a GroupType::Consumer group, and to None if
it is in a GroupType::Classic group.
Sourcepub fn upgraded(&self) -> Option<bool>
pub fn upgraded(&self) -> Option<bool>
Returns the flag indicating whether a member within a
GroupType::Consumer group uses the
GroupType::Consumer protocol. The optional is set
to true if it does, to false if it does not, and to None if it is unknown or if the
group is a GroupType::Classic group.
Trait Implementations§
Source§impl Clone for MemberDescription
impl Clone for MemberDescription
Source§fn clone(&self) -> MemberDescription
fn clone(&self) -> MemberDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemberDescription
impl Debug for MemberDescription
Source§impl Display for MemberDescription
impl Display for MemberDescription
Source§impl Hash for MemberDescription
impl Hash for MemberDescription
Source§impl PartialEq for MemberDescription
impl PartialEq for MemberDescription
impl Eq for MemberDescription
impl StructuralPartialEq for MemberDescription
Auto Trait Implementations§
impl Freeze for MemberDescription
impl RefUnwindSafe for MemberDescription
impl Send for MemberDescription
impl Sync for MemberDescription
impl Unpin for MemberDescription
impl UnsafeUnpin for MemberDescription
impl UnwindSafe for MemberDescription
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> 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.