entrust_agent/server/
request.rs

1use bincode::{Decode, Encode};
2
3#[derive(Encode, Decode, PartialEq, Debug)]
4pub enum Request {
5    SetAgeIdentity {
6        identity: String,
7        pin: Option<String>,
8    },
9    GetAgeIdentity {
10        pin: Option<String>,
11    },
12    Shutdown,
13}
14
15#[derive(Encode, Decode, PartialEq, Debug)]
16pub struct SetAgeIdentityResponse {
17    identity: String,
18}
19
20#[derive(Encode, Decode, PartialEq, Debug)]
21pub enum GetAgeIdentityResponse {
22    Ok { identity: String },
23    NotSet,
24    WrongPin,
25}