pub struct CreatableTopic {
pub name: KafkaString,
pub num_partitions: i32,
pub replication_factor: i16,
pub assignments: Vec<CreatableReplicaAssignment>,
pub configs: Vec<CreatableTopicConfig>,
pub _unknown_tagged_fields: Vec<RawTaggedField>,
}Fields§
§name: KafkaStringThe 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>Implementations§
Source§impl CreatableTopic
impl CreatableTopic
pub fn with_name(self, value: KafkaString) -> Self
pub fn with_num_partitions(self, value: i32) -> Self
pub fn with_replication_factor(self, value: i16) -> Self
pub fn with_assignments(self, value: Vec<CreatableReplicaAssignment>) -> Self
pub fn with_configs(self, value: Vec<CreatableTopicConfig>) -> Self
pub fn read(buf: &mut Bytes, version: i16) -> Result<Self>
pub fn write(&self, buf: &mut BytesMut, version: i16) -> Result<()>
pub fn encoded_len(&self, version: i16) -> Result<usize>
Trait Implementations§
Source§impl Clone for CreatableTopic
impl Clone for CreatableTopic
Source§fn clone(&self) -> CreatableTopic
fn clone(&self) -> CreatableTopic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreatableTopic
impl Debug for CreatableTopic
Source§impl Default for CreatableTopic
impl Default for CreatableTopic
Source§impl PartialEq for CreatableTopic
impl PartialEq for CreatableTopic
Source§fn eq(&self, other: &CreatableTopic) -> bool
fn eq(&self, other: &CreatableTopic) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreatableTopic
Auto Trait Implementations§
impl !Freeze for CreatableTopic
impl RefUnwindSafe for CreatableTopic
impl Send for CreatableTopic
impl Sync for CreatableTopic
impl Unpin for CreatableTopic
impl UnsafeUnpin for CreatableTopic
impl UnwindSafe for CreatableTopic
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