pub struct Partitions<'a> { /* private fields */ }
Expand description
Metadata relevant to partitions of a particular topic.
Implementations§
Source§impl<'a> Partitions<'a>
impl<'a> Partitions<'a>
Sourcepub fn iter(&self) -> PartitionIter<'a> ⓘ
pub fn iter(&self) -> PartitionIter<'a> ⓘ
Retrieves an iterator of the partitions of the underlying topic.
Sourcepub fn partition(&self, partition_id: i32) -> Option<Partition<'a>>
pub fn partition(&self, partition_id: i32) -> Option<Partition<'a>>
Finds a specified partition identified by its id.
Sourcepub fn available_ids(&self) -> Vec<i32>
pub fn available_ids(&self) -> Vec<i32>
Convenience method to retrieve the identifiers of all currently “available” partitions. Such partitions are known to have a leader broker and can be sent messages to.
Trait Implementations§
Source§impl<'a> Debug for Partitions<'a>
impl<'a> Debug for Partitions<'a>
Source§impl<'a> IntoIterator for &'a Partitions<'a>
impl<'a> IntoIterator for &'a Partitions<'a>
Auto Trait Implementations§
impl<'a> Freeze for Partitions<'a>
impl<'a> RefUnwindSafe for Partitions<'a>
impl<'a> Send for Partitions<'a>
impl<'a> Sync for Partitions<'a>
impl<'a> Unpin for Partitions<'a>
impl<'a> UnwindSafe for Partitions<'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