acme_data/models/
users.rs1use bson::oid::ObjectId;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Debug, Deserialize, Serialize)]
5pub struct Name {
6 pub complete: String,
7 pub title: String,
8 pub prefix: String,
9 pub first: String,
10 pub middle: String,
11 pub last: String,
12 pub suffix: String,
13}
14
15#[derive(Clone, Debug, Deserialize, Serialize)]
16pub struct User {
17 pub id: ObjectId,
18 pub key: String,
19}
20
21pub trait UserSpecification {
22 type Identity;
23 type Condition;
24 type Context;
25
26 fn authorize(&self) -> Self::Condition;
27}