Skip to main content

Info

Struct Info 

Source
pub struct Info<'a> {
Show 16 fields pub protocol: u8, pub name: &'a str, pub map: &'a str, pub folder: &'a str, pub game: &'a str, pub id: u16, pub players: u8, pub max_players: u8, pub bots: u8, pub server_type: ServerType, pub environment: Environment, pub is_private: bool, pub vac: bool, pub the_ship: Option<Info>, pub version: &'a str, pub extra_data: Option<ExtraData<'a>>,
}
Expand description

Parsed Source engine server information.

String fields borrow from the response packet. Use Info::to_owned to create an owned copy that can outlive that packet.

Fields§

§protocol: u8

A2S protocol version reported by the server.

§name: &'a str

Human-readable server name.

§map: &'a str

Current map name.

§folder: &'a str

Game directory name.

§game: &'a str

Human-readable game description.

§id: u16

Steam application ID of the game.

§players: u8

Number of players currently reported by the server.

§max_players: u8

Maximum number of players supported by the server.

§bots: u8

Number of bots reported by the server.

§server_type: ServerType

Whether the server is dedicated, listen-hosted, or a proxy.

§environment: Environment

Operating system family reported by the server.

§is_private: bool

Whether the server is password-protected.

§vac: bool

Whether Valve Anti-Cheat is enabled.

§the_ship: Option<Info>

Additional game mode information, present for The Ship.

§version: &'a str

Server version string.

§extra_data: Option<ExtraData<'a>>

Optional extended data advertised by the server.

Implementations§

Source§

impl Info<'_>

Source

pub fn to_owned(self) -> OwnedInfo

Copies this parsed response into an owned value.

The returned value no longer borrows the input packet.

Trait Implementations§

Source§

impl<'a> Debug for Info<'a>

Source§

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

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

impl<'a> ToOwned for Info<'a>

Source§

type Owned = OwnedInfo

The owned type this is being converted to.
Source§

fn to_owned(&self) -> Self::Owned

Perform a covnersion from a reference to owned value.

Auto Trait Implementations§

§

impl<'a> Forget for Info<'a>

§

impl<'a> Freeze for Info<'a>

§

impl<'a> Move for Info<'a>

§

impl<'a> RefUnwindSafe for Info<'a>

§

impl<'a> Send for Info<'a>

§

impl<'a> Sync for Info<'a>

§

impl<'a> Unpin for Info<'a>

§

impl<'a> UnsafeUnpin for Info<'a>

§

impl<'a> UnwindSafe for Info<'a>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.