#[non_exhaustive]pub struct CreatableTopic {
pub name: TopicName,
pub num_partitions: i32,
pub replication_factor: i16,
pub assignments: Vec<CreatableReplicaAssignment>,
pub configs: Vec<CreatableTopicConfig>,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-7
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: TopicName
The topic name.
Supported API versions: 0-7
num_partitions: i32
The number of partitions to create in the topic, or -1 if we are either specifying a manual partition assignment or using the default partitions.
Supported API versions: 0-7
replication_factor: i16
The number of replicas to create for each partition in the topic, or -1 if we are either specifying a manual partition assignment or using the default replication factor.
Supported API versions: 0-7
assignments: Vec<CreatableReplicaAssignment>
The manual partition assignment, or the empty array if we are using automatic assignment.
Supported API versions: 0-7
configs: Vec<CreatableTopicConfig>
The custom topic configurations to set.
Supported API versions: 0-7
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl CreatableTopic
impl CreatableTopic
Sourcepub fn with_name(self, value: TopicName) -> Self
pub fn with_name(self, value: TopicName) -> Self
Sets name
to the passed value.
The topic name.
Supported API versions: 0-7
Sourcepub fn with_num_partitions(self, value: i32) -> Self
pub fn with_num_partitions(self, value: i32) -> Self
Sets num_partitions
to the passed value.
The number of partitions to create in the topic, or -1 if we are either specifying a manual partition assignment or using the default partitions.
Supported API versions: 0-7
Sourcepub fn with_replication_factor(self, value: i16) -> Self
pub fn with_replication_factor(self, value: i16) -> Self
Sets replication_factor
to the passed value.
The number of replicas to create for each partition in the topic, or -1 if we are either specifying a manual partition assignment or using the default replication factor.
Supported API versions: 0-7
Sourcepub fn with_assignments(self, value: Vec<CreatableReplicaAssignment>) -> Self
pub fn with_assignments(self, value: Vec<CreatableReplicaAssignment>) -> Self
Sets assignments
to the passed value.
The manual partition assignment, or the empty array if we are using automatic assignment.
Supported API versions: 0-7
Sourcepub fn with_configs(self, value: Vec<CreatableTopicConfig>) -> Self
pub fn with_configs(self, value: Vec<CreatableTopicConfig>) -> Self
Sets configs
to the passed value.
The custom topic configurations to set.
Supported API versions: 0-7
Sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
Sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
Source§impl Clone for CreatableTopic
impl Clone for CreatableTopic
Source§fn clone(&self) -> CreatableTopic
fn clone(&self) -> CreatableTopic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreatableTopic
impl Debug for CreatableTopic
Source§impl Decodable for CreatableTopic
Available on crate feature broker
only.
impl Decodable for CreatableTopic
broker
only.Source§impl Default for CreatableTopic
impl Default for CreatableTopic
Source§impl Encodable for CreatableTopic
Available on crate feature client
only.
impl Encodable for CreatableTopic
client
only.