#[non_exhaustive]pub struct ProtocolVersion {
pub protocol: i32,
pub module: &'static str,
pub feature: &'static str,
pub name: &'static str,
pub game_versions: &'static [&'static str],
pub position_layout: PositionLayout,
pub configuration: bool,
pub enabled: bool,
}Expand description
One protocol number.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.protocol: i32Protocol number sent in the handshake.
module: &'static strName of the generated module ("v1_8", "v26_1").
feature: &'static strCargo feature that compiles the module in.
name: &'static strThe version the module is named after and tested with ("1.8.9").
game_versions: &'static [&'static str]Every release that speaks this protocol, oldest first (from minecraft-data’s
protocolVersions.json).
position_layout: PositionLayoutBit layout of packed block positions.
configuration: boolWhether the version has the configuration state (1.20.2+).
enabled: boolWhether the module is compiled in (its feature is on).
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
impl Copy for ProtocolVersion
Source§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
impl Eq for ProtocolVersion
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Forget for ProtocolVersion
impl Freeze for ProtocolVersion
impl Move 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