pub struct NewPartitionReassignment { /* private fields */ }Expand description
A new partition reassignment, which can be applied via
Admin::alter_partition_reassignments.
Corresponds to org.apache.kafka.clients.admin.NewPartitionReassignment.
Implementations§
Source§impl NewPartitionReassignment
impl NewPartitionReassignment
Sourcepub fn new(target_replicas: Vec<i32>) -> Result<Self, Error>
pub fn new(target_replicas: Vec<i32>) -> Result<Self, Error>
Creates a new partition reassignment for the given target replicas.
Mirrors the NewPartitionReassignment(List<Integer>) constructor.
§Errors
Returns an error (invalid argument) if no replicas are supplied,
mirroring Java’s IllegalArgumentException.
Sourcepub fn target_replicas(&self) -> &[i32]
pub fn target_replicas(&self) -> &[i32]
Returns the target replicas of this reassignment.
Mirrors targetReplicas().
Trait Implementations§
Source§impl Clone for NewPartitionReassignment
impl Clone for NewPartitionReassignment
Source§fn clone(&self) -> NewPartitionReassignment
fn clone(&self) -> NewPartitionReassignment
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 NewPartitionReassignment
impl Debug for NewPartitionReassignment
Source§impl PartialEq for NewPartitionReassignment
impl PartialEq for NewPartitionReassignment
impl Eq for NewPartitionReassignment
impl StructuralPartialEq for NewPartitionReassignment
Auto Trait Implementations§
impl Freeze for NewPartitionReassignment
impl RefUnwindSafe for NewPartitionReassignment
impl Send for NewPartitionReassignment
impl Sync for NewPartitionReassignment
impl Unpin for NewPartitionReassignment
impl UnsafeUnpin for NewPartitionReassignment
impl UnwindSafe for NewPartitionReassignment
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,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more