#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeFeaturesSupportedFeature {
pub(super) name: String,
pub(super) min_version: i16,
pub(super) max_version: i16,
}
impl DescribeFeaturesSupportedFeature {
pub fn name(&self) -> &str {
&self.name
}
pub const fn min_version(&self) -> i16 {
self.min_version
}
pub const fn max_version(&self) -> i16 {
self.max_version
}
pub fn into_parts(self) -> (String, i16, i16) {
(self.name, self.min_version, self.max_version)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeFeaturesFinalizedFeature {
pub(super) name: String,
pub(super) min_version_level: i16,
pub(super) max_version_level: i16,
}
impl DescribeFeaturesFinalizedFeature {
pub fn name(&self) -> &str {
&self.name
}
pub const fn min_version_level(&self) -> i16 {
self.min_version_level
}
pub const fn max_version_level(&self) -> i16 {
self.max_version_level
}
pub fn into_parts(self) -> (String, i16, i16) {
(self.name, self.min_version_level, self.max_version_level)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeFeaturesDescription {
pub(super) throttle_time_ms: u32,
pub(super) supported_features: Vec<DescribeFeaturesSupportedFeature>,
pub(super) supported_features_complete: bool,
pub(super) finalized_features_epoch: Option<i64>,
pub(super) finalized_features: Vec<DescribeFeaturesFinalizedFeature>,
pub(super) zk_migration_ready: bool,
}
impl DescribeFeaturesDescription {
pub const fn throttle_time_ms(&self) -> u32 {
self.throttle_time_ms
}
pub const fn supported_features_complete(&self) -> bool {
self.supported_features_complete
}
pub fn supported_features(&self) -> &[DescribeFeaturesSupportedFeature] {
&self.supported_features
}
pub const fn finalized_features_epoch(&self) -> Option<i64> {
self.finalized_features_epoch
}
pub fn finalized_features(&self) -> &[DescribeFeaturesFinalizedFeature] {
&self.finalized_features
}
pub const fn zk_migration_ready(&self) -> bool {
self.zk_migration_ready
}
#[allow(clippy::type_complexity)]
pub fn into_parts(
self,
) -> (
u32,
Vec<DescribeFeaturesSupportedFeature>,
bool,
Option<i64>,
Vec<DescribeFeaturesFinalizedFeature>,
bool,
) {
(
self.throttle_time_ms,
self.supported_features,
self.supported_features_complete,
self.finalized_features_epoch,
self.finalized_features,
self.zk_migration_ready,
)
}
}