fume_core/util/
get_server_info.rs1use serde::{Deserialize, Serialize};
2
3use crate::Api;
4
5use super::INTERFACE;
6
7#[derive(Clone, Debug)]
8pub struct GetServerInfo;
9
10impl GetServerInfo {
11 pub const METHOD: &str = "GetServerInfo";
12 pub const VERSION: &str = "v1";
13}
14
15impl Api for GetServerInfo {
16 fn interface() -> &'static str {
17 INTERFACE
18 }
19
20 fn method() -> &'static str {
21 Self::METHOD
22 }
23
24 fn version() -> &'static str {
25 Self::VERSION
26 }
27
28 type Response = GetServerInfoResponse;
29
30 fn parameters(&self) -> impl Iterator<Item = (&str, String)> {
31 std::iter::empty()
32 }
33}
34
35#[derive(Clone, Debug, Deserialize, Serialize)]
36#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
37pub struct GetServerInfoResponse {
38 pub servertime: u64,
39 pub servertimestring: String,
40}