Pong

Struct Pong 

Source
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: String

First line in the Friends tab list item

§description: String

Second 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: Gamemode

Not displayed in the friends tab as of MCBE v1.19.51

§port4: u16

Server’s IPv4 port

§port6: u16

Server’s IPv6 port

Implementations§

Source§

impl Pong

Source

pub fn as_bytes(&self) -> Vec<u8>

Renders a Pong packet that can be sent over UDP

Trait Implementations§

Source§

impl Default for Pong

Fills the Pong packet with default values for MCBE Dedicated server v1.19.51

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V