pub struct NewPartitions { /* private fields */ }Expand description
Describes new partitions for a particular topic in a call to
Admin::create_partitions.
Corresponds to org.apache.kafka.clients.admin.NewPartitions.
Implementations§
Source§impl NewPartitions
impl NewPartitions
Sourcepub fn increase_to(total_count: i32) -> Self
pub fn increase_to(total_count: i32) -> Self
Increase the partition count for a topic to the given total_count.
The assignment of new replicas to brokers will be decided by the broker.
total_count is the total number of partitions after the operation
succeeds.
Sourcepub fn increase_to_new_assignments(
total_count: i32,
new_assignments: Vec<Vec<i32>>,
) -> Self
pub fn increase_to_new_assignments( total_count: i32, new_assignments: Vec<Vec<i32>>, ) -> Self
Increase the partition count for a topic to the given total_count
assigning the new partitions according to the given new_assignments.
The length of the given new_assignments should equal
total_count - old_count, since the assignment of existing partitions
is not changed. Each inner list of new_assignments should have a
length equal to the topic’s replication factor. The first broker id in
each inner list is the “preferred replica”.
total_count is the total number of partitions after the operation
succeeds; new_assignments are the replica assignments for the new
partitions.
Sourcepub fn total_count(&self) -> i32
pub fn total_count(&self) -> i32
The total number of partitions after the operation succeeds.
Trait Implementations§
Source§impl Clone for NewPartitions
impl Clone for NewPartitions
Source§fn clone(&self) -> NewPartitions
fn clone(&self) -> NewPartitions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NewPartitions
impl Debug for NewPartitions
Source§impl Display for NewPartitions
impl Display 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.