JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

User Auth Early

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨8069fba

⁨src/model/user.rs⁩ - ⁨342⁩ bytes
Raw
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