ya_etcd_rs/auth/
role_list.rs1use crate::ResponseHeader;
2use crate::proto::etcdserverpb;
3
4#[derive(Debug, Default, Clone)]
5pub struct AuthRoleListRequest {
6 proto: etcdserverpb::AuthRoleListRequest,
7}
8
9impl From<AuthRoleListRequest> for etcdserverpb::AuthRoleListRequest {
10 fn from(req: AuthRoleListRequest) -> Self {
11 req.proto
12 }
13}
14
15#[derive(Debug, Clone)]
16pub struct AuthRoleListResponse {
17 pub header: ResponseHeader,
18 pub roles: Vec<String>,
19}
20
21impl From<etcdserverpb::AuthRoleListResponse> for AuthRoleListResponse {
22 fn from(proto: etcdserverpb::AuthRoleListResponse) -> Self {
23 Self {
24 header: From::from(proto.header.expect("must fetch header")),
25 roles: proto.roles,
26 }
27 }
28}