Skip to content

Commit 1ac4d63

Browse files
committed
fix(rust): Fix documentation on user and admin role types in rust
1 parent a88909d commit 1ac4d63

File tree

1 file changed

+12
-3
lines changed
  • rust/catalyst-signed-doc-spec/src/signers

1 file changed

+12
-3
lines changed

rust/catalyst-signed-doc-spec/src/signers/roles.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
33
/// Document's 'roles' fields definition
44
#[derive(serde::Deserialize)]
5-
#[allow(clippy::missing_docs_in_private_items)]
65
pub struct Roles {
76
#[serde(default)]
7+
/// A list of user roles that can post this document
8+
/// Empty list == No user role can post.
89
pub user: Vec<UserRole>,
910
#[serde(default)]
11+
/// A list of admin roles that can post this document
12+
/// Empty list == No admin role can post.
13+
/// Placeholder for future use.
14+
/// Assume that any Admin Role is equivalent, so admin NOT empty means
15+
/// Must be signed with the temporary admin key.
1016
pub admin: Vec<AdminRole>,
1117
}
1218

1319
/// Role definition
1420
#[derive(serde::Deserialize)]
15-
#[allow(clippy::missing_docs_in_private_items)]
1621
pub enum UserRole {
1722
/// Role 0 - A registered User / Voter - Base Role
1823
Registered,
@@ -22,8 +27,12 @@ pub enum UserRole {
2227
Representative,
2328
}
2429

30+
/// Admin Role definitions.
31+
/// Placeholder for future use.
32+
/// Assume that any Admin Role is equivalent,
33+
/// so admin NOT empty means
34+
/// Must be signed with the temporary admin key.
2535
#[derive(serde::Deserialize)]
26-
#[allow(clippy::missing_docs_in_private_items)]
2736
pub enum AdminRole {
2837
/// Root Certificate Authority role.
2938
#[serde(rename = "Root CA")]

0 commit comments

Comments
 (0)