pub struct Handshake {
pub protocol_version: VarInt,
pub server_addr: String,
pub server_port: u16,
pub next_state: VarInt,
}
Fields§
§protocol_version: VarInt
§server_addr: String
§server_port: u16
§next_state: VarInt
Implementations§
Trait Implementations§
Source§impl Packet for Handshake
impl Packet for Handshake
const ID: i32 = 0i32
Source§fn to_bytes(&self) -> Vec<u8> ⓘ
fn to_bytes(&self) -> Vec<u8> ⓘ
Serializes the packet to a Vec<u8> in accordance with the minecraft protocol so that it can be sent via the network. Read more
Source§fn from_reader(reader: &mut PacketReader) -> Result<Self, Errors>
fn from_reader(reader: &mut PacketReader) -> Result<Self, Errors>
Allows the reading of packets from a PacketReader. Read more
Auto Trait Implementations§
impl Freeze for Handshake
impl RefUnwindSafe for Handshake
impl Send for Handshake
impl Sync for Handshake
impl Unpin for Handshake
impl UnwindSafe for Handshake
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