hypothesis_rs/profile.rs
1//! Objects related to the "profile" endpoint
2
3use std::collections::HashMap;
4
5use serde::{Deserialize, Serialize};
6
7use crate::UserAccountID;
8
9/// User profile information
10#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq)]
11pub struct UserProfile {
12 /// "hypothes.is"
13 pub authority: String,
14 pub features: HashMap<String, bool>,
15 pub preferences: HashMap<String, bool>,
16 /// This property will be a string of the format "acct:username@authority" if the request is authenticated.
17 /// This property will be null if the request is not authenticated.
18 pub userid: Option<UserAccountID>,
19}