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