pub struct QueryData {
pub motd: String,
pub game_type: String,
pub map: String,
pub online_players: u32,
pub max_players: u32,
pub host_port: u16,
pub host_ip: String,
pub players: Vec<String>,
pub plugins: Vec<String>,
}Expand description
Data returned by the UDP Query API (GameSpy4 / enable-query in server.properties).
Placeholder — will be populated when src/protocol/query.rs is
implemented in a future release. The Query API provides a richer view than
a regular ping: full player list, exact plugin list, and more.
Requires enable-query=true in server.properties on the target server.
Fields§
§motd: StringServer MOTD.
game_type: StringGame type, typically "SMP".
map: StringCurrent map/world name.
online_players: u32Number of players currently online.
max_players: u32Server player capacity.
host_port: u16Port the server listens on.
host_ip: StringServer IP as reported by the Query response.
players: Vec<String>Full list of online player names (not truncated like the status sample).
plugins: Vec<String>Server plugins as reported by the Query API.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QueryData
impl<'de> Deserialize<'de> for QueryData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueryData
impl RefUnwindSafe for QueryData
impl Send for QueryData
impl Sync for QueryData
impl Unpin for QueryData
impl UnsafeUnpin for QueryData
impl UnwindSafe for QueryData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more