pub enum ProtocolVersion {
V1_21,
V1_21_2,
V1_21_4,
V1_21_5,
V1_21_6,
V1_21_7,
V1_21_9,
V1_21_11,
}Expand description
Minecraft protocol version.
Variants§
V1_21
1.21, 1.21.1 (protocol 767)
V1_21_2
1.21.2, 1.21.3 (protocol 768)
V1_21_4
1.21.4 (protocol 769)
V1_21_5
1.21.5 (protocol 770)
V1_21_6
1.21.6 (protocol 771)
V1_21_7
1.21.7, 1.21.8 (protocol 772)
V1_21_9
1.21.9, 1.21.10 (protocol 773)
V1_21_11
1.21.11 (protocol 774)
Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
Sourcepub const MINIMUM_PROTOCOL: i32 = 767
pub const MINIMUM_PROTOCOL: i32 = 767
The minimum protocol number we accept.
Sourcepub const MAXIMUM_PROTOCOL: i32 = 774
pub const MAXIMUM_PROTOCOL: i32 = 774
The maximum protocol number we accept.
Sourcepub const SUPPORTED_VERSIONS: &'static str = "1.21-1.21.11"
pub const SUPPORTED_VERSIONS: &'static str = "1.21-1.21.11"
The supported version range as a human-readable string.
Sourcepub const fn from_protocol(protocol: i32) -> Option<Self>
pub const fn from_protocol(protocol: i32) -> Option<Self>
Create a ProtocolVersion from a protocol number.
Returns None if the protocol number is not supported.
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
Source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
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 ProtocolVersion
impl Debug for ProtocolVersion
Source§impl Display for ProtocolVersion
impl Display for ProtocolVersion
Source§impl Hash for ProtocolVersion
impl Hash for ProtocolVersion
Source§impl Ord for ProtocolVersion
impl Ord for ProtocolVersion
Source§fn cmp(&self, other: &ProtocolVersion) -> Ordering
fn cmp(&self, other: &ProtocolVersion) -> 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 ProtocolVersion
impl PartialEq for ProtocolVersion
Source§impl PartialOrd for ProtocolVersion
impl PartialOrd for ProtocolVersion
impl Copy for ProtocolVersion
impl Eq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnsafeUnpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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