mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Specified MIT license and made the valve protocol check if the queried game is the right game
This commit is contained in:
parent
1cb00f826a
commit
192d50a11d
4 changed files with 34 additions and 18 deletions
|
|
@ -7,7 +7,9 @@ pub enum GDError {
|
|||
PacketUnderflow(String),
|
||||
PacketBad(String),
|
||||
PacketSend(String),
|
||||
PacketReceive(String)
|
||||
PacketReceive(String),
|
||||
UnknownEnumCast,
|
||||
BadGame(String)
|
||||
}
|
||||
|
||||
impl fmt::Display for GDError {
|
||||
|
|
@ -17,7 +19,9 @@ impl fmt::Display for GDError {
|
|||
GDError::PacketUnderflow(details) => write!(f, "Packet underflow: {details}"),
|
||||
GDError::PacketBad(details) => write!(f, "Packet bad: {details}"),
|
||||
GDError::PacketSend(details) => write!(f, "Couldn't send a packet: {details}"),
|
||||
GDError::PacketReceive(details) => write!(f, "Couldn't receive a packet: {details}")
|
||||
GDError::PacketReceive(details) => write!(f, "Couldn't receive a packet: {details}"),
|
||||
GDError::UnknownEnumCast => write!(f, "Unknown enum cast encountered."),
|
||||
GDError::BadGame(details) => write!(f, "Queried another game that the supposed one: {details}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue