Struct fluvio_sc_schema::partition::PartitionSpec
source · pub struct PartitionSpec {
pub leader: i32,
pub replicas: Vec<i32>,
pub cleanup_policy: Option<CleanupPolicy>,
pub storage: Option<TopicStorageConfig>,
pub compression_type: CompressionAlgorithm,
pub deduplication: Option<Deduplication>,
pub system: bool,
pub mirror: Option<PartitionMirrorConfig>,
}
Expand description
Spec for Partition Each partition has replicas spread among SPU one of replica is leader which is duplicated in the leader field
Fields§
§leader: i32
§replicas: Vec<i32>
§cleanup_policy: Option<CleanupPolicy>
§storage: Option<TopicStorageConfig>
§compression_type: CompressionAlgorithm
§deduplication: Option<Deduplication>
§system: bool
§mirror: Option<PartitionMirrorConfig>
Implementations§
source§impl PartitionSpec
impl PartitionSpec
pub fn new(leader: i32, replicas: Vec<i32>) -> PartitionSpec
sourcepub fn from_replicas(
replicas: Vec<i32>,
topic: &TopicSpec,
mirror: Option<&PartitionMirrorConfig>,
) -> PartitionSpec
pub fn from_replicas( replicas: Vec<i32>, topic: &TopicSpec, mirror: Option<&PartitionMirrorConfig>, ) -> PartitionSpec
Create new partition spec from replica mapping with topic spec. This assume first replica is leader
pub fn has_spu(&self, spu: &i32) -> bool
pub fn mirror_string(&self) -> String
Trait Implementations§
source§impl AdminSpec for PartitionSpec
impl AdminSpec for PartitionSpec
source§fn convert_from<C: MetadataItem>(
obj: &MetadataStoreObject<Self, C>,
) -> Metadata<Self>
fn convert_from<C: MetadataItem>( obj: &MetadataStoreObject<Self, C>, ) -> Metadata<Self>
convert metadata object to list type object
source§impl Clone for PartitionSpec
impl Clone for PartitionSpec
source§fn clone(&self) -> PartitionSpec
fn clone(&self) -> PartitionSpec
Returns a copy of the value. Read more
1.0.0 · 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 PartitionSpec
impl Debug for PartitionSpec
source§impl Decoder for PartitionSpec
impl Decoder for PartitionSpec
source§impl Default for PartitionSpec
impl Default for PartitionSpec
source§fn default() -> PartitionSpec
fn default() -> PartitionSpec
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PartitionSpec
impl<'de> Deserialize<'de> for PartitionSpec
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartitionSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartitionSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Encoder for PartitionSpec
impl Encoder for PartitionSpec
source§impl K8ExtendedSpec for PartitionSpec
impl K8ExtendedSpec for PartitionSpec
const FINALIZER: Option<&'static str> = _
type K8Spec = PartitionSpec
fn convert_from_k8( k8_obj: K8Obj<<PartitionSpec as K8ExtendedSpec>::K8Spec>, multi_namespace_context: bool, ) -> Result<MetadataStoreObject<PartitionSpec, K8MetaItem>, K8ConvertError<<PartitionSpec as K8ExtendedSpec>::K8Spec>>
fn convert_status_from_k8( status: <PartitionSpec as Spec>::Status, ) -> <PartitionSpec as Spec>::Status
fn into_k8(self) -> <PartitionSpec as K8ExtendedSpec>::K8Spec
const DELETE_WAIT_DEPENDENTS: bool = false
source§impl PartialEq for PartitionSpec
impl PartialEq for PartitionSpec
source§impl Serialize for PartitionSpec
impl Serialize for PartitionSpec
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 PartitionSpec
impl Spec for PartitionSpec
source§impl Spec for PartitionSpec
impl Spec for PartitionSpec
source§impl SpecExt for PartitionSpec
impl SpecExt for PartitionSpec
const OBJECT_TYPE: ObjectType = ObjectType::Partition
impl Eq for PartitionSpec
impl StructuralPartialEq for PartitionSpec
Auto Trait Implementations§
impl Freeze for PartitionSpec
impl RefUnwindSafe for PartitionSpec
impl Send for PartitionSpec
impl Sync for PartitionSpec
impl Unpin for PartitionSpec
impl UnwindSafe for PartitionSpec
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.