22/// The "legacy" BeeGFS numeric Id-NodeType combination that can be used to identify an entity like
33/// a node or target. Because each entity type has its own id space (meaning a combination is not
44/// globally unique), the entity type must be known in addition to uniquely identify an entity.
5- #[ allow( clippy:: derive_partial_eq_without_eq) ]
6- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
5+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
76pub struct LegacyId {
87 /// BeeGFS numeric id.
98 /// Required, 0 is invalid.
@@ -23,7 +22,6 @@ pub struct LegacyId {
2322/// 2) In a response message (from the management), _all_ fields should be set. The request processor
2423/// should have all info about an entity available. If that isn't the case, leaving fields empty is
2524/// allowed.
26- #[ allow( clippy:: derive_partial_eq_without_eq) ]
2725#[ derive( Clone , PartialEq , :: prost:: Message ) ]
2826pub struct EntityIdSet {
2927 /// The global, unique entity id. Identifies an entity from all types without any additional
@@ -59,11 +57,11 @@ impl EntityType {
5957 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
6058 pub fn as_str_name ( & self ) -> & ' static str {
6159 match self {
62- EntityType :: Unspecified => "ENTITY_TYPE_UNSPECIFIED" ,
63- EntityType :: Node => "NODE" ,
64- EntityType :: Target => "TARGET" ,
65- EntityType :: BuddyGroup => "BUDDY_GROUP" ,
66- EntityType :: Pool => "POOL" ,
60+ Self :: Unspecified => "ENTITY_TYPE_UNSPECIFIED" ,
61+ Self :: Node => "NODE" ,
62+ Self :: Target => "TARGET" ,
63+ Self :: BuddyGroup => "BUDDY_GROUP" ,
64+ Self :: Pool => "POOL" ,
6765 }
6866 }
6967 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -94,11 +92,11 @@ impl NodeType {
9492 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
9593 pub fn as_str_name ( & self ) -> & ' static str {
9694 match self {
97- NodeType :: Unspecified => "NODE_TYPE_UNSPECIFIED" ,
98- NodeType :: Client => "CLIENT" ,
99- NodeType :: Meta => "META" ,
100- NodeType :: Storage => "STORAGE" ,
101- NodeType :: Management => "MANAGEMENT" ,
95+ Self :: Unspecified => "NODE_TYPE_UNSPECIFIED" ,
96+ Self :: Client => "CLIENT" ,
97+ Self :: Meta => "META" ,
98+ Self :: Storage => "STORAGE" ,
99+ Self :: Management => "MANAGEMENT" ,
102100 }
103101 }
104102 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -128,10 +126,10 @@ impl ReachabilityState {
128126 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
129127 pub fn as_str_name ( & self ) -> & ' static str {
130128 match self {
131- ReachabilityState :: Unspecified => "REACHABILITY_STATE_UNSPECIFIED" ,
132- ReachabilityState :: Online => "ONLINE" ,
133- ReachabilityState :: Poffline => "POFFLINE" ,
134- ReachabilityState :: Offline => "OFFLINE" ,
129+ Self :: Unspecified => "REACHABILITY_STATE_UNSPECIFIED" ,
130+ Self :: Online => "ONLINE" ,
131+ Self :: Poffline => "POFFLINE" ,
132+ Self :: Offline => "OFFLINE" ,
135133 }
136134 }
137135 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -160,10 +158,10 @@ impl ConsistencyState {
160158 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
161159 pub fn as_str_name ( & self ) -> & ' static str {
162160 match self {
163- ConsistencyState :: Unspecified => "CONSISTENCY_STATE_UNSPECIFIED" ,
164- ConsistencyState :: Good => "GOOD" ,
165- ConsistencyState :: NeedsResync => "NEEDS_RESYNC" ,
166- ConsistencyState :: Bad => "BAD" ,
161+ Self :: Unspecified => "CONSISTENCY_STATE_UNSPECIFIED" ,
162+ Self :: Good => "GOOD" ,
163+ Self :: NeedsResync => "NEEDS_RESYNC" ,
164+ Self :: Bad => "BAD" ,
167165 }
168166 }
169167 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -192,10 +190,10 @@ impl CapacityPool {
192190 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
193191 pub fn as_str_name ( & self ) -> & ' static str {
194192 match self {
195- CapacityPool :: Unspecified => "CAPACITY_POOL_UNSPECIFIED" ,
196- CapacityPool :: Normal => "NORMAL" ,
197- CapacityPool :: Low => "LOW" ,
198- CapacityPool :: Emergency => "EMERGENCY" ,
193+ Self :: Unspecified => "CAPACITY_POOL_UNSPECIFIED" ,
194+ Self :: Normal => "NORMAL" ,
195+ Self :: Low => "LOW" ,
196+ Self :: Emergency => "EMERGENCY" ,
199197 }
200198 }
201199 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -223,9 +221,9 @@ impl NicType {
223221 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
224222 pub fn as_str_name ( & self ) -> & ' static str {
225223 match self {
226- NicType :: Unspecified => "NIC_TYPE_UNSPECIFIED" ,
227- NicType :: Ethernet => "ETHERNET" ,
228- NicType :: Rdma => "RDMA" ,
224+ Self :: Unspecified => "NIC_TYPE_UNSPECIFIED" ,
225+ Self :: Ethernet => "ETHERNET" ,
226+ Self :: Rdma => "RDMA" ,
229227 }
230228 }
231229 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -252,9 +250,9 @@ impl QuotaIdType {
252250 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
253251 pub fn as_str_name ( & self ) -> & ' static str {
254252 match self {
255- QuotaIdType :: Unspecified => "QUOTA_ID_TYPE_UNSPECIFIED" ,
256- QuotaIdType :: User => "QUOTA_ID_TYPE_USER" ,
257- QuotaIdType :: Group => "QUOTA_ID_TYPE_GROUP" ,
253+ Self :: Unspecified => "QUOTA_ID_TYPE_UNSPECIFIED" ,
254+ Self :: User => "QUOTA_ID_TYPE_USER" ,
255+ Self :: Group => "QUOTA_ID_TYPE_GROUP" ,
258256 }
259257 }
260258 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -281,9 +279,9 @@ impl QuotaType {
281279 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
282280 pub fn as_str_name ( & self ) -> & ' static str {
283281 match self {
284- QuotaType :: Unspecified => "QUOTA_TYPE_UNSPECIFIED" ,
285- QuotaType :: Space => "QUOTA_TYPE_SPACE" ,
286- QuotaType :: Inode => "QUOTA_TYPE_INODE" ,
282+ Self :: Unspecified => "QUOTA_TYPE_UNSPECIFIED" ,
283+ Self :: Space => "QUOTA_TYPE_SPACE" ,
284+ Self :: Inode => "QUOTA_TYPE_INODE" ,
287285 }
288286 }
289287 /// Creates an enum from field names used in the ProtoBuf definition.
0 commit comments