pub struct TopicSpec { /* private fields */ }
Implementations§
source§impl TopicSpec
impl TopicSpec
pub fn new_assigned(partition_map: impl Into<PartitionMaps>) -> TopicSpec
pub fn new_computed( partitions: u32, replication: u32, ignore_rack: Option<bool> ) -> TopicSpec
pub fn new_mirror(mirror: MirrorConfig) -> TopicSpec
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) -> u32
pub fn replication_factor(&self) -> Option<u32>
pub fn ignore_rack_assignment(&self) -> bool
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 AdminSpec for TopicSpec
impl AdminSpec for TopicSpec
source§fn convert_from<C>(obj: &MetadataStoreObject<Self, C>) -> Metadata<Self>where
C: MetadataItem,
Metadata<Self>: From<MetadataStoreObject<Self, C>>,
Self::Status: Encoder + Decoder + Debug,
fn convert_from<C>(obj: &MetadataStoreObject<Self, C>) -> Metadata<Self>where
C: MetadataItem,
Metadata<Self>: From<MetadataStoreObject<Self, C>>,
Self::Status: Encoder + Decoder + Debug,
convert metadata object to list type object
source§impl<'de> Deserialize<'de> for TopicSpec
impl<'de> Deserialize<'de> for TopicSpec
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TopicSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TopicSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<(u32, u32)> for TopicSpec
impl From<(u32, u32)> for TopicSpec
convert from tuple with partition and replication with rack off
source§impl From<ReplicaSpec> for TopicSpec
impl From<ReplicaSpec> for TopicSpec
source§fn from(replicas: ReplicaSpec) -> TopicSpec
fn from(replicas: ReplicaSpec) -> TopicSpec
Converts to this type from the input type.
source§impl From<TopicConfig> for TopicSpec
impl From<TopicConfig> for TopicSpec
source§fn from(config: TopicConfig) -> TopicSpec
fn from(config: TopicConfig) -> TopicSpec
Converts to this type from the input type.
source§impl K8ExtendedSpec for TopicSpec
impl K8ExtendedSpec for TopicSpec
type K8Spec = TopicSpec
const DELETE_WAIT_DEPENDENTS: bool = true
fn convert_from_k8( k8_obj: K8Obj<<TopicSpec as K8ExtendedSpec>::K8Spec>, multi_namespace_context: bool ) -> Result<MetadataStoreObject<TopicSpec, K8MetaItem>, K8ConvertError<<TopicSpec as K8ExtendedSpec>::K8Spec>>
fn convert_status_from_k8( status: <TopicSpec as Spec>::Status ) -> <TopicSpec as Spec>::Status
fn into_k8(self) -> <TopicSpec as K8ExtendedSpec>::K8Spec
const FINALIZER: Option<&'static str> = None
source§impl PartialEq for TopicSpec
impl PartialEq for TopicSpec
source§impl Serialize for TopicSpec
impl Serialize for TopicSpec
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl Spec for TopicSpec
impl Spec for TopicSpec
source§impl SpecExt for TopicSpec
impl SpecExt for TopicSpec
const OBJECT_TYPE: ObjectType = ObjectType::Topic
impl Creatable for TopicSpec
impl CreatableAdminSpec 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