pub enum ReplicaSpec {
Assigned(PartitionMaps),
Computed(TopicReplicaParam),
Mirror(MirrorConfig),
}
Variants§
Implementations§
source§impl ReplicaSpec
impl ReplicaSpec
pub fn new_assigned<J>(partition_map: J) -> Selfwhere
J: Into<PartitionMaps>,
pub fn new_computed( partitions: PartitionCount, replication: ReplicationFactor, ignore_rack: Option<IgnoreRackAssignment> ) -> Self
pub fn is_computed(&self) -> bool
pub fn partitions(&self) -> PartitionCount
pub fn replication_factor(&self) -> Option<ReplicationFactor>
pub fn ignore_rack_assignment(&self) -> IgnoreRackAssignment
pub fn type_label(&self) -> &'static str
pub fn partitions_display(&self) -> String
pub fn replication_factor_display(&self) -> String
pub fn ignore_rack_assign_display(&self) -> &'static str
pub fn partition_map_str(&self) -> Option<String>
sourcepub fn valid_partition(partitions: &PartitionCount) -> Result<()>
pub fn valid_partition(partitions: &PartitionCount) -> Result<()>
Validate partitions
sourcepub fn valid_replication_factor(replication: &ReplicationFactor) -> Result<()>
pub fn valid_replication_factor(replication: &ReplicationFactor) -> Result<()>
Validate replication factor
Trait Implementations§
source§impl Clone for ReplicaSpec
impl Clone for ReplicaSpec
source§fn clone(&self) -> ReplicaSpec
fn clone(&self) -> ReplicaSpec
Returns a copy 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 ReplicaSpec
impl Debug for ReplicaSpec
source§impl Decoder for ReplicaSpec
impl Decoder for ReplicaSpec
source§impl Default for ReplicaSpec
impl Default for ReplicaSpec
source§impl Display for ReplicaSpec
impl Display for ReplicaSpec
source§impl Encoder for ReplicaSpec
impl Encoder for ReplicaSpec
source§impl From<ReplicaSpec> for TopicSpec
impl From<ReplicaSpec> for TopicSpec
source§fn from(replicas: ReplicaSpec) -> Self
fn from(replicas: ReplicaSpec) -> Self
Converts to this type from the input type.
source§impl PartialEq for ReplicaSpec
impl PartialEq for ReplicaSpec
source§fn eq(&self, other: &ReplicaSpec) -> bool
fn eq(&self, other: &ReplicaSpec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ReplicaSpec
impl StructuralPartialEq for ReplicaSpec
Auto Trait Implementations§
impl Freeze for ReplicaSpec
impl RefUnwindSafe for ReplicaSpec
impl Send for ReplicaSpec
impl Sync for ReplicaSpec
impl Unpin for ReplicaSpec
impl UnwindSafe for ReplicaSpec
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<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.