pub struct Pong {
pub title: String,
pub description: String,
pub protocol: (u64, String),
pub gamemode: Gamemode,
pub port4: u16,
pub port6: u16,
/* private fields */
}Expand description
Represents a Pong packet
You can generate a Pong packet from ServerProperties or use the Default::default()
Use as_bytes() to render a RakNet Pong packet
Fields§
§title: StringFirst line in the Friends tab list item
description: StringSecond line in the Friends tab list item
protocol: (u64, String)The string must be in format X.X.X, where X is a number, otherwise the client wont display it. See Bedrock version numbers
gamemode: GamemodeNot displayed in the friends tab as of MCBE v1.19.51
port4: u16Server’s IPv4 port
port6: u16Server’s IPv6 port
Implementations§
Trait Implementations§
Source§impl Default for Pong
Fills the Pong packet with default values for MCBE Dedicated server v1.19.51
impl Default for Pong
Fills the Pong packet with default values for MCBE Dedicated server v1.19.51
Source§impl From<ServerProperties> for Pong
Takes everything it can from server.properties and the rest is set
using Default::default()
impl From<ServerProperties> for Pong
Takes everything it can from server.properties and the rest is set
using Default::default()
Source§fn from(props: ServerProperties) -> Self
fn from(props: ServerProperties) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Pong
impl RefUnwindSafe for Pong
impl Send for Pong
impl Sync for Pong
impl Unpin for Pong
impl UnwindSafe for Pong
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