pub struct UpdateFeaturesRequest;Expand description
Java UpdateFeaturesRequest helpers.
Implementations§
Source§impl UpdateFeaturesRequest
impl UpdateFeaturesRequest
Sourcepub fn get_feature(
version: i16,
updates: &[FeatureUpdateKey],
name: &str,
) -> Result<FeatureUpdateKey>
pub fn get_feature( version: i16, updates: &[FeatureUpdateKey], name: &str, ) -> Result<FeatureUpdateKey>
Java UpdateFeaturesRequest.getFeature.
First matching Feature name (Java FeatureUpdates.find). A
missing name is crate::Error::protocol (Java NPE on the null
FeatureUpdateKey). v0 rewrites UpgradeType from
AllowDowngrade (true is UPGRADE_TYPE_SAFE_DOWNGRADE,
false is UPGRADE_TYPE_UPGRADE) and ignores a stored
UpgradeType. v1+ is UpgradeType.fromCode on the stored
UpgradeType (unknown codes, including Java UNKNOWN 0,
become 0) and sets AllowDowngrade from UpgradeType != 1.
Encode still writes FeatureUpdates as-is (AllowDowngrade on
v0, UpgradeType on v1+).
Sourcepub fn feature_updates(
version: i16,
updates: &[FeatureUpdateKey],
) -> Vec<FeatureUpdateKey>
pub fn feature_updates( version: i16, updates: &[FeatureUpdateKey], ) -> Vec<FeatureUpdateKey>
Java UpdateFeaturesRequest.featureUpdates.
Each FeatureUpdates entry is Self::get_feature of that
entry’s name. Duplicate names all become the first match
(Java find then FeatureUpdateItem). Empty is empty.
Encode still writes FeatureUpdates as-is.