Struct rdkafka::admin::NewPartitions
source · pub struct NewPartitions<'a> {
pub topic_name: &'a str,
pub new_partition_count: usize,
pub assignment: Option<PartitionAssignment<'a>>,
}
Expand description
Configuration for a CreatePartitions operation.
Fields§
§topic_name: &'a str
The name of the topic to which partitions should be added.
new_partition_count: usize
The total number of partitions after the operation completes.
assignment: Option<PartitionAssignment<'a>>
The replica assignments for the new partitions.
Implementations§
source§impl<'a> NewPartitions<'a>
impl<'a> NewPartitions<'a>
sourcepub fn new(topic_name: &'a str, new_partition_count: usize) -> NewPartitions<'a>
pub fn new(topic_name: &'a str, new_partition_count: usize) -> NewPartitions<'a>
Creates a new NewPartitions
.
sourcepub fn assign(self, assignment: PartitionAssignment<'a>) -> NewPartitions<'_>
pub fn assign(self, assignment: PartitionAssignment<'a>) -> NewPartitions<'_>
Sets the partition replica assignment for the new partitions. Only assignments for newly created replicas should be included.
Auto Trait Implementations§
impl<'a> Freeze for NewPartitions<'a>
impl<'a> RefUnwindSafe for NewPartitions<'a>
impl<'a> Send for NewPartitions<'a>
impl<'a> Sync for NewPartitions<'a>
impl<'a> Unpin for NewPartitions<'a>
impl<'a> UnwindSafe for NewPartitions<'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