pub struct TopicDescription { /* private fields */ }Expand description
A detailed description of a single topic in the cluster.
Implementations§
Source§impl TopicDescription
impl TopicDescription
Sourcepub fn new(
name: impl Into<String>,
internal: bool,
partitions: Vec<TopicPartitionInfo>,
) -> Self
pub fn new( name: impl Into<String>, internal: bool, partitions: Vec<TopicPartitionInfo>, ) -> Self
Create an instance with the specified parameters.
§Arguments
name- The topic nameinternal- Whether the topic is internal to Kafkapartitions- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
Create an instance with the specified parameters.
§Arguments
name- The topic nameinternal- Whether the topic is internal to Kafkapartitions- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.authorized_operations- authorized operations for this topic, orNoneif this is not known.
Create an instance with the specified parameters.
§Arguments
name- The topic nameinternal- Whether the topic is internal to Kafkapartitions- A list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.authorized_operations- authorized operations for this topic, orNoneif this is not known.topic_id- the topic id
Sourcepub fn is_internal(&self) -> bool
pub fn is_internal(&self) -> bool
Returns whether the topic is internal to Kafka. An example of an internal topic
is the offsets and group management topic: __consumer_offsets.
Sourcepub fn partitions(&self) -> &[TopicPartitionInfo]
pub fn partitions(&self) -> &[TopicPartitionInfo]
Returns a list of partitions where the index represents the partition id and the element contains leadership and replica information for that partition.
Returns the authorized operations for this topic, or None if this is not known.
Trait Implementations§
Source§impl Clone for TopicDescription
impl Clone for TopicDescription
Source§fn clone(&self) -> TopicDescription
fn clone(&self) -> TopicDescription
Returns a duplicate of the value. Read more
1.0.0 · 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 TopicDescription
impl Debug for TopicDescription
Source§impl Display for TopicDescription
impl Display for TopicDescription
Source§impl Hash for TopicDescription
impl Hash for TopicDescription
Source§impl PartialEq for TopicDescription
impl PartialEq for TopicDescription
impl Eq for TopicDescription
Auto Trait Implementations§
impl Freeze for TopicDescription
impl RefUnwindSafe for TopicDescription
impl Send for TopicDescription
impl Sync for TopicDescription
impl Unpin for TopicDescription
impl UnsafeUnpin for TopicDescription
impl UnwindSafe for TopicDescription
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,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more