#[non_exhaustive]pub enum UpgradeType {
Unknown,
Upgrade,
SafeDowngrade,
UnsafeDowngrade,
}Expand description
Indicates what kind of upgrade should be performed for a
FeatureUpdate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
Unknown upgrade type.
Upgrade
Upgrading the feature level.
SafeDowngrade
Only downgrades which do not result in metadata loss are permitted.
UnsafeDowngrade
Any downgrade, including those which may result in metadata loss, are permitted.
Implementations§
Source§impl UpgradeType
impl UpgradeType
Sourcepub fn from_code(code: i32) -> UpgradeType
pub fn from_code(code: i32) -> UpgradeType
Returns the upgrade type for the given wire-protocol code, falling back
to UpgradeType::Unknown for unrecognized codes.
§Arguments
code- the wire-protocol code.
Trait Implementations§
Source§impl Clone for UpgradeType
impl Clone for UpgradeType
Source§fn clone(&self) -> UpgradeType
fn clone(&self) -> UpgradeType
Returns a duplicate 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 UpgradeType
impl Debug for UpgradeType
Source§impl Display for UpgradeType
Java’s inherited Enum.toString(): the constant’s name.
impl Display for UpgradeType
Java’s inherited Enum.toString(): the constant’s name.
Source§impl Hash for UpgradeType
impl Hash for UpgradeType
Source§impl Ord for UpgradeType
impl Ord for UpgradeType
Source§fn cmp(&self, other: &UpgradeType) -> Ordering
fn cmp(&self, other: &UpgradeType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UpgradeType
impl PartialEq for UpgradeType
Source§impl PartialOrd for UpgradeType
impl PartialOrd for UpgradeType
impl Copy for UpgradeType
impl Eq for UpgradeType
impl StructuralPartialEq for UpgradeType
Auto Trait Implementations§
impl Freeze for UpgradeType
impl RefUnwindSafe for UpgradeType
impl Send for UpgradeType
impl Sync for UpgradeType
impl Unpin for UpgradeType
impl UnsafeUnpin for UpgradeType
impl UnwindSafe for UpgradeType
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more