pub struct CreateTopic { /* private fields */ }Expand description
One topic in a batched creation request.
Implementations§
Source§impl CreateTopic
impl CreateTopic
Sourcepub fn new(name: impl Into<String>, partitions: i32) -> Self
pub fn new(name: impl Into<String>, partitions: i32) -> Self
Creates a topic using Kafka’s default replication factor.
Sourcepub fn with_replica_assignments(
name: impl Into<String>,
assignments: Vec<CreateTopicReplicaAssignment>,
conflicting_replication_factor: Option<i16>,
) -> Self
pub fn with_replica_assignments( name: impl Into<String>, assignments: Vec<CreateTopicReplicaAssignment>, conflicting_replication_factor: Option<i16>, ) -> Self
Creates a topic with exact manual replica assignments.
Sourcepub const fn with_replication_factor(self, replication_factor: i16) -> Self
pub const fn with_replication_factor(self, replication_factor: i16) -> Self
Sets an explicit replication factor.
Sourcepub fn with_config(self, config: CreateTopicConfig) -> Self
pub fn with_config(self, config: CreateTopicConfig) -> Self
Appends one topic configuration.
Trait Implementations§
Source§impl Clone for CreateTopic
impl Clone for CreateTopic
Source§impl Debug for CreateTopic
impl Debug for CreateTopic
impl Eq for CreateTopic
Source§impl PartialEq for CreateTopic
impl PartialEq for CreateTopic
impl StructuralPartialEq for CreateTopic
Auto Trait Implementations§
impl Freeze for CreateTopic
impl RefUnwindSafe for CreateTopic
impl Send for CreateTopic
impl Sync for CreateTopic
impl Unpin for CreateTopic
impl UnsafeUnpin for CreateTopic
impl UnwindSafe for CreateTopic
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