ya_etcd_rs/auth/
auth_enable.rs

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