Struct fast_protocol::datatypes::packets::StatusResponsePacket
source · pub struct StatusResponsePacket { /* private fields */ }Expand description
Reponse Packet for basic server information
Response Packet, used to tell the client basic informations about the server, like the maximum amount of players, the current amount of players and the motd of the server
Implementations§
source§impl StatusResponsePacket
impl StatusResponsePacket
sourcepub fn new(
version: String,
protocol: u16,
max_players: u16,
player_count: u16,
players: Vec<Player>,
modt: String
) -> Self
pub fn new( version: String, protocol: u16, max_players: u16, player_count: u16, players: Vec<Player>, modt: String ) -> Self
function to initialize a new instance of StatusResponsePacket
§Arguments
version - A String representation of the server version
protocol - An u16 representing the current protocol version
max_player - An u16 representing the amount of allowed concurrent connections
player_count - An u16 reporesenting the current ammount of established connections
players - An Vec<Player> to display them in the server list
motd - An String of the message of the day
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatusResponsePacket
impl RefUnwindSafe for StatusResponsePacket
impl Send for StatusResponsePacket
impl Sync for StatusResponsePacket
impl Unpin for StatusResponsePacket
impl UnwindSafe for StatusResponsePacket
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