1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#[macro_export]
macro_rules! credential_type {
($t:expr; $($x:expr),* $(,)?) => ({
use $crate::CredentialAttributeSchema;
use $crate::CredentialAttributeType::{Number, Utf8String, Blob};
let mut attributes = vec![CredentialAttributeSchema {
label: $crate::SECRET_ID.into(),
description: "".to_string(),
attribute_type: Blob,
unknown: true,
}];
$(attributes.push($x.into());)*
$crate::CredentialSchema {
id: $t.into(),
label: String::new(),
description: String::new(),
attributes,
}
});
}
#[macro_export]
macro_rules! credential_attribute_values {
($($x:expr),* $(,)?) => ({
use $crate::CredentialAttribute;
let mut attribute_values: Vec<CredentialAttribute> = vec![];
$(attribute_values.push($x.into());)*
attribute_values
});
}
#[macro_export]
macro_rules! reveal_attributes {
($($x:expr),* $(,)?) => ({
let mut reveal_attributes: Vec<String> = vec![];
$(reveal_attributes.push($x.into());)*
reveal_attributes
});
}