pub struct Topics<'a> { /* private fields */ }
Expand description
A view on the loaded metadata about topics and their partitions.
Implementations§
Source§impl<'a> Topics<'a>
impl<'a> Topics<'a>
Sourcepub fn new(client: &KafkaClient) -> Topics<'_>
pub fn new(client: &KafkaClient) -> Topics<'_>
Constructs a view of the currently loaded topic metadata from the specified kafka client.
pub fn is_empty(&self) -> bool
Sourcepub fn names(&'a self) -> TopicNames<'a> ⓘ
pub fn names(&'a self) -> TopicNames<'a> ⓘ
A convenience method to return an iterator over the topics’ names.
Sourcepub fn contains(&'a self, topic: &str) -> bool
pub fn contains(&'a self, topic: &str) -> bool
A convenience method to determine whether the specified topic is known.
Sourcepub fn partitions(&'a self, topic: &str) -> Option<Partitions<'a>>
pub fn partitions(&'a self, topic: &str) -> Option<Partitions<'a>>
Retrieves the partitions of a specified topic.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Topics<'a>
impl<'a> RefUnwindSafe for Topics<'a>
impl<'a> Send for Topics<'a>
impl<'a> Sync for Topics<'a>
impl<'a> Unpin for Topics<'a>
impl<'a> UnwindSafe for Topics<'a>
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