#[derive(Debug, Serialize)]
struct HLQueryResult {
+ address: SocketAddrV4,
info: Result<a2s::info::Info, HLQueryError>,
rules: Result<Vec<a2s::rules::Rule>, HLQueryError>,
players: Result<Vec<a2s::players::Player>, HLQueryError>
impl HLQueryResult {
fn new(a2s_client: &A2SClient, server: SocketAddrV4) -> Self {
Self {
+ address: server,
info: a2s_client.info(server).map_err(From::from),
rules: a2s_client.rules(server).map_err(From::from),
players: a2s_client.players(server).map_err(From::from)