pub struct TopicSpec { /* private fields */ }Implementations§
Source§impl TopicSpec
impl TopicSpec
pub fn new_assigned(partition_map: impl Into<PartitionMaps>) -> Self
pub fn new_computed( partitions: PartitionCount, replication: ReplicationFactor, ignore_rack: Option<IgnoreRackAssignment>, ) -> Self
pub fn new_mirror(mirror: MirrorConfig) -> Self
pub fn replicas(&self) -> &ReplicaSpec
pub fn set_replicas(&mut self, replicas: ReplicaSpec)
pub fn set_cleanup_policy(&mut self, policy: CleanupPolicy)
pub fn get_partition_mirror_map(&self) -> Option<PartitionMaps>
pub fn get_clean_policy(&self) -> Option<&CleanupPolicy>
pub fn set_compression_type(&mut self, compression: CompressionAlgorithm)
pub fn get_compression_type(&self) -> &CompressionAlgorithm
pub fn get_storage(&self) -> Option<&TopicStorageConfig>
pub fn get_storage_mut(&mut self) -> Option<&mut TopicStorageConfig>
pub fn set_storage(&mut self, storage: TopicStorageConfig)
pub fn get_deduplication(&self) -> Option<&Deduplication>
pub fn set_deduplication(&mut self, deduplication: Option<Deduplication>)
pub fn is_system(&self) -> bool
pub fn set_system(&mut self, system: bool)
Sourcepub fn retention_secs(&self) -> u32
pub fn retention_secs(&self) -> u32
get retention secs that can be displayed
Sourcepub fn validate_config(&self) -> Option<String>
pub fn validate_config(&self) -> Option<String>
validate configuration, return string with errors
Methods from Deref<Target = ReplicaSpec>§
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>
Trait Implementations§
Source§impl From<(u32, u32)> for TopicSpec
convert from tuple with partition and replication with rack off
impl From<(u32, u32)> for TopicSpec
convert from tuple with partition and replication with rack off
Source§fn from(spec: (PartitionCount, ReplicationFactor)) -> Self
fn from(spec: (PartitionCount, ReplicationFactor)) -> Self
Converts to this type from the input type.
Source§impl From<(u32, u32, bool)> for TopicSpec
impl From<(u32, u32, bool)> for TopicSpec
Source§fn from(spec: (PartitionCount, ReplicationFactor, IgnoreRackAssignment)) -> Self
fn from(spec: (PartitionCount, ReplicationFactor, IgnoreRackAssignment)) -> Self
Converts to this type from the input type.
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 From<TopicConfig> for TopicSpec
impl From<TopicConfig> for TopicSpec
Source§fn from(config: TopicConfig) -> Self
fn from(config: TopicConfig) -> Self
Converts to this type from the input type.
Source§impl SpecExt for TopicSpec
impl SpecExt for TopicSpec
const OBJECT_TYPE: ObjectType = ObjectType::Topic
impl Creatable for TopicSpec
impl StructuralPartialEq for TopicSpec
Auto Trait Implementations§
impl Freeze for TopicSpec
impl RefUnwindSafe for TopicSpec
impl Send for TopicSpec
impl Sync for TopicSpec
impl Unpin for TopicSpec
impl UnwindSafe for TopicSpec
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