Skip to main content

Feature

Trait Feature 

Source
pub trait Feature: Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn supported_range(&self) -> (i16, i16);
    fn default_level(&self, bootstrap_mv: i16) -> i16;

    // Provided methods
    fn min_required_floor(&self, _image: &MetadataImage) -> i16 { ... }
    fn dependencies(&self, _level: i16) -> &'static [(&'static str, i16)] { ... }
    fn level_name(&self, _level: i16) -> Option<&'static str> { ... }
}
Expand description

One versioned cluster feature (KIP-584).

Required Methods§

Source

fn name(&self) -> &'static str

KIP-584 feature name, e.g. "metadata.version".

Source

fn supported_range(&self) -> (i16, i16)

Inclusive [min, max] supported level range. Advertised in ApiVersions.supported_features and accepted by UpdateFeatures.

Source

fn default_level(&self, bootstrap_mv: i16) -> i16

The level finalized at krabka format for the bootstrap metadata.version level, which is the resolved --release-version. Kafka derives the default of every feature from the release in this way.

Provided Methods§

Source

fn min_required_floor(&self, _image: &MetadataImage) -> i16

Lowest level that the live image permits for a finalize or a downgrade: the “unsafe downgrade” floor. It defaults to the supported min, where no live-state constraint applies.

Source

fn dependencies(&self, _level: i16) -> &'static [(&'static str, i16)]

KIP-1022 dependencies: (other_feature, min_level) pairs that must be finalized at >= min_level before THIS feature may be finalized at level. Empty by default.

Source

fn level_name(&self, _level: i16) -> Option<&'static str>

Optional Kafka level name (e.g. metadata.version’s "3.7-IV4"). None for plain integer features.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§