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 underlying 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 specified topic.

Trait Implementations

impl<'a> Debug for Topics<'a>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

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

impl<'a> IntoIterator for 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