mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Crate] Add better documentation for generic game implementation (#49)
This commit is contained in:
parent
08e00c64e4
commit
4b081371f4
6 changed files with 28 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ pub mod protocols;
|
|||
|
||||
pub use protocols::*;
|
||||
|
||||
/// Versions of the gamespy protocol
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum GameSpyVersion {
|
||||
|
|
@ -15,6 +16,7 @@ pub enum GameSpyVersion {
|
|||
Three,
|
||||
}
|
||||
|
||||
/// Enum of versions and their ExtraResponse data
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum VersionedExtraResponse {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ pub struct JavaResponse {
|
|||
pub server_type: Server,
|
||||
}
|
||||
|
||||
/// Non-generic java response
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct JavaExtraResponse {
|
||||
|
|
@ -146,6 +147,7 @@ pub struct BedrockResponse {
|
|||
pub server_type: Server,
|
||||
}
|
||||
|
||||
/// Non-generic bedrock response
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct BedrockExtraResponse {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ pub struct Response<P> {
|
|||
pub unused_entries: HashMap<String, String>,
|
||||
}
|
||||
|
||||
/// Non-generic quake response
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ExtraResponse {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ pub struct Response {
|
|||
pub rules: Option<HashMap<String, String>>,
|
||||
}
|
||||
|
||||
/// Non-generic valve response
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct ExtraResponse {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue