earthmc 2.0.0

Async client for interacting with the EarthMC API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde::{Deserialize, Serialize};
use uuid::Uuid;

/// An object with a name and [`Uuid`] which can be specialized to
/// `(String, Uuid)` or `(Option<String>, Option<Uuid>)`.
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq)]
pub struct GenericNamedUuid<N, U> {
    pub name: N,
    pub uuid: U,
}

pub type NamedUuid = GenericNamedUuid<String, Uuid>;

pub type NamedUuidOpt = GenericNamedUuid<Option<String>, Option<Uuid>>;