pub struct Topic { /* private fields */ }Expand description
A topic consisting of one or more partitions.
Implementations§
Source§impl Topic
impl Topic
Sourcepub fn num_partitions(&self) -> u32
pub fn num_partitions(&self) -> u32
Returns the number of partitions.
Sourcepub fn partition(&self, idx: u32) -> Option<&Partition>
pub fn partition(&self, idx: u32) -> Option<&Partition>
Returns a reference to the partition at the given index.
Sourcepub fn partition_mut(&mut self, idx: u32) -> Option<&mut Partition>
pub fn partition_mut(&mut self, idx: u32) -> Option<&mut Partition>
Returns a mutable reference to the partition at the given index.
Auto Trait Implementations§
impl Freeze for Topic
impl !RefUnwindSafe for Topic
impl !Send for Topic
impl !Sync for Topic
impl Unpin for Topic
impl !UnwindSafe for Topic
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