Struct kafka::client::metadata::Topics
[−]
[src]
pub struct Topics<'a> { // some fields omitted }
A view on the loaded metadata about topics and their partitions.
Methods
impl<'a> Topics<'a>
[src]
fn new(client: &KafkaClient) -> Topics
Constructs a view of the currently loaded topic metadata from the specified kafka client.
fn len(&self) -> usize
Retrieves the number of the underlying topics.
fn iter(&'a self) -> TopicIter<'a>
Provides an iterator over the known topics.
fn names(&'a self) -> TopicNames<'a>
A conveniece method to return an iterator the topics' names.
fn contains(&'a self, topic: &str) -> bool
A convenience method to determine whether the specified topic is known.
fn partitions(&'a self, topic: &str) -> Option<Partitions<'a>>
Retrieves the partitions of a known topic.
fn partition_ids(&'a self, topic: &str) -> Option<Vec<i32>>
Retrieves a snapshot/copy of the partition ids available for the specified topic. Note that the returned copy may get out of date if the underlying client's metadata gets refreshed.
Trait Implementations
impl<'a> Debug for Topics<'a>
[src]
impl<'a> IntoIterator for &'a Topics<'a>
[src]
type Item = Topic<'a>
The type of the elements being iterated over.
type IntoIter = TopicIter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more