File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,46 @@ where
153
153
}
154
154
}
155
155
156
+ impl < T > fmt:: Binary for BitFlags < T >
157
+ where
158
+ T : RawBitFlags ,
159
+ T :: Type : fmt:: Binary ,
160
+ {
161
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
162
+ fmt:: Binary :: fmt ( & self . bits ( ) , fmt)
163
+ }
164
+ }
165
+
166
+ impl < T > fmt:: Octal for BitFlags < T >
167
+ where
168
+ T : RawBitFlags ,
169
+ T :: Type : fmt:: Octal ,
170
+ {
171
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
172
+ fmt:: Octal :: fmt ( & self . bits ( ) , fmt)
173
+ }
174
+ }
175
+
176
+ impl < T > fmt:: LowerHex for BitFlags < T >
177
+ where
178
+ T : RawBitFlags ,
179
+ T :: Type : fmt:: LowerHex ,
180
+ {
181
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
182
+ fmt:: LowerHex :: fmt ( & self . bits ( ) , fmt)
183
+ }
184
+ }
185
+
186
+ impl < T > fmt:: UpperHex for BitFlags < T >
187
+ where
188
+ T : RawBitFlags ,
189
+ T :: Type : fmt:: UpperHex ,
190
+ {
191
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
192
+ fmt:: UpperHex :: fmt ( & self . bits ( ) , fmt)
193
+ }
194
+ }
195
+
156
196
/// The default value returned is one with all flags unset, i. e. [`empty`][Self::empty].
157
197
impl < T > Default for BitFlags < T >
158
198
where
You can’t perform that action at this time.
0 commit comments