Struct GameServer

Source
pub struct GameServer {
    pub name: String,
    pub address: String,
    pub port: u16,
    pub description: String,
    pub location: Option<Country>,
    pub auth_server: String,
    pub query_port: Option<u16>,
    pub channel: Option<String>,
    pub official: bool,
    pub extra: HashMap<String, Field>,
}

Fields§

§name: String

The name of the server.

§address: String

The address through which the server might be accessed on the open internet. This field may be an IPv4 address, IPv6 address, URL, must not contain a port

§port: u16

Port of the gameserver address (usually 14004)

§description: String

The server description.

§location: Option<Country>

The ISO 3166‑1 Alpha-2 code that the server is physically based in (note: this field is intended as an indication of factors like ping, not the language of the server). (e.g. “US”)

§auth_server: String

The auth server that must be used to connect to this server. If you want to use the official auth server use Some("https://auth.veloren.net")

§query_port: Option<u16>

Port used for server information queries (default: 14006), the address will be the same as the gameserver address. None indicates that the server does not accept information queries.

§channel: Option<String>

The version channel used by the server. None means not running a channel distributed by Airshipper. If in doubt, "weekly" is probably correct.

§official: bool

Whether the server is officially affiliated with the Veloren project.

§extra: HashMap<String, Field>

Any extra attributes provided by the server.

The key is a machine-readable ID. Frontends may choose to display these fields in a different way (for example, adding an icon) based on this machine-readable ID, if they recognise it. There is no specific list of valid IDs and recognition is based on convention. Some examples of IDs include:

  • website
  • email
  • discord
  • mastodon
  • reddit
  • youtube

Implementations§

Source§

impl GameServer

Source

pub fn new( name: &str, address: &str, port: u16, query_port: Option<u16>, desc: &str, location: Option<Country>, auth: &str, channel: Option<&str>, official: bool, extra: HashMap<String, Field>, ) -> Self

Trait Implementations§

Source§

impl Clone for GameServer

Source§

fn clone(&self) -> GameServer

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GameServer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GameServer

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for GameServer

Source§

fn eq(&self, other: &GameServer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GameServer

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for GameServer

Source§

impl StructuralPartialEq for GameServer

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,