2026-02-08 16:21:04 +01:00
|
|
|
use smol_str::SmolStr;
|
|
|
|
|
|
2026-02-06 23:24:21 +01:00
|
|
|
#[non_exhaustive]
|
|
|
|
|
#[derive(Debug, Clone, Default, Eq, PartialEq)]
|
|
|
|
|
pub enum ClusterLocationStatus {
|
|
|
|
|
#[doc(alias = "red")]
|
|
|
|
|
Dead,
|
|
|
|
|
#[doc(alias = "orange")]
|
|
|
|
|
Damaged,
|
|
|
|
|
#[doc(alias = "good")]
|
|
|
|
|
#[default]
|
|
|
|
|
Ok,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Default)]
|
|
|
|
|
pub enum Relation {
|
|
|
|
|
CloseFriend,
|
|
|
|
|
Friend,
|
|
|
|
|
Pooled,
|
|
|
|
|
Me,
|
|
|
|
|
Focus,
|
|
|
|
|
#[default]
|
|
|
|
|
None,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Default)]
|
|
|
|
|
pub enum ClusterLocationData {
|
|
|
|
|
User {
|
|
|
|
|
login: smol_str::SmolStr,
|
|
|
|
|
image: Option<url::Url>,
|
|
|
|
|
relation: Relation,
|
|
|
|
|
},
|
|
|
|
|
Normal {
|
|
|
|
|
status: ClusterLocationStatus,
|
|
|
|
|
},
|
|
|
|
|
#[default]
|
|
|
|
|
Empty,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
pub struct ClusterLocation {
|
|
|
|
|
pub location: smol_str::SmolStr,
|
|
|
|
|
pub data: ClusterLocationData,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
pub struct CluserInformation {
|
|
|
|
|
pub cluster_name: smol_str::SmolStr,
|
|
|
|
|
pub locations: Vec<ClusterLocation>,
|
|
|
|
|
}
|
2026-02-08 16:21:04 +01:00
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
pub struct Friend {
|
|
|
|
|
pub login: SmolStr,
|
|
|
|
|
pub image: Option<String>,
|
|
|
|
|
pub position: Option<SmolStr>,
|
|
|
|
|
pub last_active: Option<SmolStr>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
pub struct Friends {
|
|
|
|
|
pub friends: Vec<Friend>,
|
|
|
|
|
}
|