This commit is contained in:
Maieul BOYER 2026-02-06 23:24:21 +01:00
parent 8afdd208c6
commit 8e82ec9523
Signed by: maix
SSH key fingerprint: SHA256:iqCzqFFF5KjRixmDExqbAltCIj9ndlBWIGJf3t9Ln9g
23 changed files with 3345 additions and 0 deletions

View file

@ -0,0 +1,48 @@
#[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>,
}