#[non_exhaustive]pub struct CreatableTopic {
pub name: String,
pub num_partitions: i32,
pub replication_factor: i16,
pub assignments: Vec<CreatableReplicaAssignment>,
pub configs: Vec<CreatableTopicConfig>,
pub unknown_tagged_fields: Vec<RawTaggedField>,
}Expand description
CreatableTopic (nested in CreateTopicsRequest).
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: StringThe topic name.
num_partitions: i32The number of partitions to create in the topic, or -1 if we are either specifying a manual partition assignment or using the default partitions.
replication_factor: i16The 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.
assignments: Vec<CreatableReplicaAssignment>The manual partition assignment, or the empty array if we are using automatic assignment.
configs: Vec<CreatableTopicConfig>The custom topic configurations to set.
unknown_tagged_fields: Vec<RawTaggedField>Tagged fields not (yet) known to this crate, kept raw.
Implementations§
Source§impl CreatableTopic
impl CreatableTopic
Sourcepub fn encode(
&self,
buf: &mut impl BufMut,
version: i16,
) -> Result<(), EncodeError>
pub fn encode( &self, buf: &mut impl BufMut, version: i16, ) -> Result<(), EncodeError>
Encode this CreatableTopic at version.
Sourcepub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
pub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
Decode one CreatableTopic, bounding allocation by the default
Limits derived from buf’s remaining length.
Sourcepub fn decode_with_limits(
buf: &mut impl Buf,
version: i16,
limits: Limits,
) -> Result<Self, DecodeError>
pub fn decode_with_limits( buf: &mut impl Buf, version: i16, limits: Limits, ) -> Result<Self, DecodeError>
Decode one CreatableTopic under limits.
Sourcepub fn decode_with_budget(
buf: &mut impl Buf,
version: i16,
budget: &mut Budget,
) -> Result<Self, DecodeError>
pub fn decode_with_budget( buf: &mut impl Buf, version: i16, budget: &mut Budget, ) -> Result<Self, DecodeError>
Decode one CreatableTopic against an existing budget.