openmultiplayer_query 0.1.2

Implements the needed builders and parsers for SA:MP's/Open Multiplayer's Query Mechanism, allowing a developer to retrieve data from a running server.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[derive(thiserror::Error, Debug)]
pub enum PacketError {
    #[error("{} is not a valid IP address", .0)]
    InvalidAddress(String),
    #[error("data not available because packet was not built")]
    PacketNotBuilt,
    #[error("failed to read data from packet")]
    ReadError(#[from] std::io::Error),
    #[error("failed to decode data with WINDOWS_1251 instance")]
    Windows1251Error,
    #[error("failed to decode data to utf-8")]
    Utf8Error(#[from] std::string::FromUtf8Error),
}