File tree 1 file changed +40
-0
lines changed 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,46 @@ where
168
168
}
169
169
}
170
170
171
+ impl < T > fmt:: Binary for BitFlags < T >
172
+ where
173
+ T : RawBitFlags ,
174
+ T :: Type : fmt:: Binary ,
175
+ {
176
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
177
+ fmt:: Binary :: fmt ( & self . bits ( ) , fmt)
178
+ }
179
+ }
180
+
181
+ impl < T > fmt:: Octal for BitFlags < T >
182
+ where
183
+ T : RawBitFlags ,
184
+ T :: Type : fmt:: Octal ,
185
+ {
186
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
187
+ fmt:: Octal :: fmt ( & self . bits ( ) , fmt)
188
+ }
189
+ }
190
+
191
+ impl < T > fmt:: LowerHex for BitFlags < T >
192
+ where
193
+ T : RawBitFlags ,
194
+ T :: Type : fmt:: LowerHex ,
195
+ {
196
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
197
+ fmt:: LowerHex :: fmt ( & self . bits ( ) , fmt)
198
+ }
199
+ }
200
+
201
+ impl < T > fmt:: UpperHex for BitFlags < T >
202
+ where
203
+ T : RawBitFlags ,
204
+ T :: Type : fmt:: UpperHex ,
205
+ {
206
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
207
+ fmt:: UpperHex :: fmt ( & self . bits ( ) , fmt)
208
+ }
209
+ }
210
+
171
211
/// The default value returned is one with all flags unset, i. e. [`empty`][Self::empty].
172
212
impl < T > Default for BitFlags < T >
173
213
where
You can’t perform that action at this time.
0 commit comments