retrommo-fetch 0.2.0

Wrapper around the RetroMMO API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::{Deserialize, Serialize};

/// Represents a single player entry from a `LeaderboardPage`.
#[derive(Debug, Deserialize, Serialize)]
pub struct LeaderboardEntry {
    pub experience: u64,
    pub permissions: u8,
    pub username: String,
}

impl std::fmt::Display for LeaderboardEntry {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}: {} experience", self.username, self.experience)
    }
}