pub struct NewPartitions {
pub total_count: i32,
pub assignments: Vec<Vec<i32>>,
}Expand description
Partition increase request used with KafkaAdmin::create_partitions.
Kafka can only increase a topic’s partition count. total_count is the new
total number of partitions, not the number of partitions to add.
use kafkit_client::NewPartitions;
admin
.create_partitions([("orders", NewPartitions::increase_to(12))])
.await?;Fields§
§total_count: i32New total partition count for the topic.
assignments: Vec<Vec<i32>>Optional per-new-partition replica broker assignments.
Implementations§
Source§impl NewPartitions
impl NewPartitions
Sourcepub fn increase_to(total_count: i32) -> Self
pub fn increase_to(total_count: i32) -> Self
Creates a request to increase a topic to total_count partitions.
Sourcepub fn with_assignment<I>(self, broker_ids: I) -> Selfwhere
I: IntoIterator<Item = i32>,
pub fn with_assignment<I>(self, broker_ids: I) -> Selfwhere
I: IntoIterator<Item = i32>,
Adds an explicit replica assignment for one new partition.
Call this once for each new partition that needs an explicit broker assignment.
Trait Implementations§
Source§impl Clone for NewPartitions
impl Clone for NewPartitions
Source§fn clone(&self) -> NewPartitions
fn clone(&self) -> NewPartitions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NewPartitions
impl Debug for NewPartitions
Source§impl PartialEq for NewPartitions
impl PartialEq for NewPartitions
impl Eq for NewPartitions
impl StructuralPartialEq for NewPartitions
Auto Trait Implementations§
impl Freeze for NewPartitions
impl RefUnwindSafe for NewPartitions
impl Send for NewPartitions
impl Sync for NewPartitions
impl Unpin for NewPartitions
impl UnsafeUnpin for NewPartitions
impl UnwindSafe for NewPartitions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.