1 |
use serde::{Deserialize, Serialize};
|
2 |
|
3 |
use super::instance::Instance;
|
4 |
|
5 |
#[derive(Clone, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)]
|
6 |
pub struct User {
|
7 |
pub username: String,
|
8 |
pub instance: Instance,
|
9 |
}
|
10 |
|
11 |
impl ToString for User {
|
12 |
fn to_string(&self) -> String {
|
13 |
format!("{}:{}", self.username, self.instance.url)
|
14 |
}
|
15 |
}
|
16 |
|