49 lines
903 B
Rust
49 lines
903 B
Rust
|
|
#[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>,
|
||
|
|
}
|