Files
boc/aamos-ledger-rust/target/release/deps/libbitflags-2e9f93174bd0ef8d.rlib
T

1330 lines
273 KiB
Plaintext
Raw Normal View History

!<arch>
/ 0 0 0 0 2856 `
eÖ_ZN153_$LT$core..result..Result$LT$T$C$F$GT$$u20$as$u20$core..ops..try_trait..FromResidual$LT$core..result..Result$LT$core..convert..Infallible$C$E$GT$$GT$$GT$13from_residual17h5e3e90464e1d0a01E_ZN4core10intrinsics23is_val_statically_known17h321b37184065ce21E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h0c24b5aab26d16f3E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h3712356de1354563E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h397cbd7f52f4b710E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h47b2c18390691a4cE_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h4ebd3efe0cb1133eE_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h5a3431a9192e1830E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h5d4b5f13340fbd92E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h8f154caf3c9d0d61E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17ha0729ef15e9d8d0aE_ZN4core6result19Result$LT$T$C$E$GT$7map_err17hc6357168b68f33c2E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17hd4cd5709234742c5E_ZN4core6result19Result$LT$T$C$E$GT$7map_err17hd6ab4db4b3e30c93E_ZN67_$LT$bitflags..parser..ParseError$u20$as$u20$core..fmt..Display$GT$3fmt17he7c53cc96c402673E_ZN79_$LT$core..result..Result$LT$T$C$E$GT$$u20$as$u20$core..ops..try_trait..Try$GT$6branch17h5e2cc1187bfd3139E_ZN8bitflags6parser10ParseError10empty_flag17hf7c550462a3a23bdE_ZN8bitflags6parser10ParseError16invalid_hex_flag17h1f172435096ff90dE_ZN8bitflags6traits59_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$i8$GT$9parse_hex17h0e178a35c3e3ece6E_ZN8bitflags6traits59_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$u8$GT$9parse_hex17h32edee0d91077a44E_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$i16$GT$9parse_hex17h9d6e830aba7ef64dE_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$i32$GT$9parse_hex17hc0303de6e5d50973E_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$i64$GT$9parse_hex17h5f2294523bcb3fbbE_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$u16$GT$9parse_hex17h67523dceca5017dcE_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$u32$GT$9parse_hex17hf85dbbc1f1ecce88E_ZN8bitflags6traits60_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$u64$GT$9parse_hex17h71ff86becd7abba0E_ZN8bitflags6traits61_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$i128$GT$9parse_hex17hfd62de1b55126fedE_ZN8bitflags6traits61_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$u128$GT$9parse_hex17h801abbe5cc0cd0faE_ZN8bitflags6traits62_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$isize$GT$9parse_hex17h907dfe8e08aaf57cE_ZN8bitflags6traits62_$LT$impl$u20$bitflags..parser..ParseHex$u20$for$u20$usize$GT$9parse_hex17hd9aa78be3fa944d1E// 66 `
bitflags-2e9f93174bd0ef8d.bitflags.20cbf7685dea6b8e-cgu.0.rcgu.o/
lib.rmeta/ 0 0 0 644 219568 `
ELF·0X@@GNUÀrust
U#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁ‰@ AsDisplayÁL©»serdeÁŒƒÎŸ,»ŸŒßÎ arbitraryÁLûƬŸÎbytemuckÁDü»æ¤ÙÍŸ»ŸŒÍ__impl_external_bitflags_serdeÁôûŸŒ¢ÍÆL¤'»Æ¬„'ÍæDÑ'»æ¤¶'Í"__impl_external_bitflags_arbitraryÁüà("»Æ¬»(Í!__impl_external_bitflags_bytemuckÁü¥1!»æ¤1example_generatedÁŒÏ’»ñì§’testsÁ,ô’$é’íùIterÁ  innerÁ doneÁæ __private_const_newÁó  IterNamesÁflagsÁidxÁsourceÁ remainingÁæ ""­"š&&&ó IterDefinedNamesÁ**÷*ƒ..æ 111ó IterEqualNamesÁ5¥5ù5´9¥9æ  <¥<<ó parserÁ@@@@@@@ to_writerÁGG
impl WriteÁ@þJJ J @to_writer_truncateÁNNÖ@from_str_truncateÁQ@to_writer_strictÁSSÖ@from_str_strictÁVV @WriteHexÁY write_hexÁZ¨@ParseHexÁ\ parse_hexÁ@^invalid_hex_flagÁ_impl fmt::DisplayÁ^invalid_named_flagÁaé
^
empty_flagÁ@d×traitsÁffffffffff f
f f fttæ tÐ t»tis_namedÁt
is_unnamedÁfFlagsÁ{FLAGSÁ{BitsÁ{emptyÁ{£{ all_namedÁ  {
known_bitsÁ{ unknown_bitsÁ{contains_unknown_bitsÁ{´{ from_bitsÁ{from_bits_truncateÁ{from_bits_retainÁ{ from_nameÁ{ù{
iter_namesÁ{iter_defined_namesÁ{iter_equal_namesÁ{is_emptyÁ{is_allÁ{
intersectsÁ{containsÁ{truncateÁ{insertÁ{removeÁ{toggleÁ{setÁ{clearÁ{ intersectionÁ{C{
differenceÁ{symmetric_differenceÁ{
complementÁfÖ žEMPTYÁžALLÁf PrimitiveÁf impl_bitsÁf PublicFlagsÁ£ê£InternalÁfBitFlagsÁ¦ç¦àf©©ç©àf­fImplementedByBitFlagsMacroÁf __privateÁ°°°œ´´´´bitflagsÁ__impl_bitflagsÁbitflags_matchÁ__bitflags_matchÁ__bitflags_flagÁ__bitflags_expr_safe_attrsÁ__bitflags_item_safe_attrsÁ__bitflags_flag_nameÁÐ Ã__declare_public_bitflagsÁÃ__impl_public_bitflags_forwardÁÃ__impl_public_bitflagsÁÃ__impl_public_bitflags_iterÁÃ__impl_public_bitflags_opsÁÃ__impl_public_bitflags_constsÁåÊ__declare_internal_bitflagsÁÊ__impl_internal_bitflagsÁ©ÍœÍ__impl_external_bitflagsÁÍœÍÿ͹@
ParseErrorÁÓ
Óˆ@Ö×@ParseErrorKindÁØ EmptyFlagÁÙ
ØInvalidNamedFlagÁÛgotÁØInvalidHexFlagÁÝ÷@ß×fFlagÁááÐ á»fåå×fèÓèàfëÓëàfî¾
ï fñ¾
ò fô˜
õ¨f ÷˜
ø¨f
f f üÓüàf
ÿÓÿàf¾
ƒ f¾
 fˆ˜
¨f˜
Œ¨fffÓàfÓàf¾
 f¾
š fœ˜
¨fŸ˜
 ¨fff¤Ó¤àf§Ó§àfª¾
« f­¾
® f °˜
±¨f!³˜
´¨f"f#f$¸Ó¸àf%»Ó»àf&¾¾
¿ f'Á¾
 f(Ę
Ũf)ǘ
Ȩf*f+f,ÌÓÌàf-ÏÓÏàf.Ò¾
Ó f/Õ¾
Ö f0ؘ
Ù¨f1Û˜
ܨf2f3

!
%
)
4
;
?
G
J
N
Q
S
V
Z
]
e
e
e
w
x
y
z
ƒ



Š

Œ
Ž









˜
×
×
×
à
à
à
ç
ç
ç
ï
ò
õ
ø
ƒ


Œ

š

 
«
®
±
´
¿
Â
Å
È
Ó
Ö
Ù
Ü
Y\{ž¡£¦¯ùM  ç
ù:€™c·>ùMà÷ƒš ²ì4X¡Û"ùM**î,÷-ƒXYæÓûæŸÛ"ùM55Å7ù8´(M¸sv¥¿cÓÓÔÕˆ@ áþN¯Aû#,¿cØÙÚÉÛßÜ÷@ÝÞ÷@[‡Ä*2tÄc¹$¿cáá«ãÐ fä»f:z÷™$&Û"žž\˜&\¢&Y˜&Y¢&¡¢&¡˜&žž\ä&\î&Yä&Yî&¡î&¡ä&žž\°'\º'Y°'Yº'¡º'¡°'žž\ü'\†(Yü'Y†(¡†(¡ü'žž\È(\Ò(YÈ(YÒ(¡Ò(¡È(žž\”)\ž)Y”)Yž)¡ž)¡”)¦Û"¯Û" &1*<ÓߨåádÓèëüÿ¤§¸»ÌÏîñª­¾ÁÒÕô÷ˆœŸ°³ÄÇØÛúûŽ¢£·ÊËÞß©­ùM¥¿cÄcž \ <Y <¡ <¦<¯¬Ç
!Û"$ü­S  Û"üþˆ§" Û",è"÷8Ó,Ÿüá8ôá
$Û",€4‡L3üÇv  Û",­Ãüàã§"$¸ 
Ö%,Û"Û"è"¤÷%)š-e€.ÛåÐÖÚàäê
&$€.O ˜1  Û"/ ¼60>§";ò.6Û"5Û"4è"×ò.ÄÛ"ÅÛ"Æ÷qvš{´è"Œ¾
ûMè"0(¼¸HLÛ Û"Û" Û¼Û" ú  Û¼Û"„±
 è"´·


%Û" .
ü·
!

Û"D
+
  Û¼Û"ü³
¤ˆ  è"Û"܈ $ 
Û" 3  4 üô
0ϙ

Û" F
 $üï
6 Û¼Û"
¡    


ü…œìÞÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÛ"”› §"LÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¸3þ è"ž)Û"«Óû·-, è"LÛ"vÛ"}®·-Ïž)>»flagÁ
=Ã2Ç4ñ4næ5þ’6Ú$­æ5ü“!œ“6<æ5üÊ!œÊ’6=ü¿· Û"|Û"ò. ù”)ü õüì!è"·-Û"üý8)Û"Àý8î÷)X¥|Û"ò.æ5c6Cæ5%6Û"üÀg Û" ð”)­$üÙÔè"ò.Û"4•Û"L ÷"š&Z
Lÿ4–å Û"â”) ¦ô$òè"îò.ìÛ"êÛ"èò.±Û"¥Û"÷š#XÛ"ˆ%üË=·-æê8 ,ü’® ò.”)Ä©´
üsÖ%”)C6l´0Û Ö%t†Û"̆D•ñ4)T•$ Û¼¸3”)”) æ”)\$ 
wÛ"$ 4 ´›
Ø| B' 
xÛ" 
œô$æ5 ?
 4\™
Û"Ì®œ®’6
 ü™/
Û"
UE 
ü¥#1 Û"Ìöœö’6
üÜ4
Û"UEüë%1Û"ÌŜŒ6
ü¯0
Û"VEü¾!\ÿ$„ ¶C$ÿ4„ ÌŒ œŒ ’6
üþ( üù. Û¼¸3º Û¼¸3Ô  üßõ )üÂþüé×ë7”õ¸8Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙŽB=”)Yž)ŽBß·-üDº3wý8·-&¦·-èÛ"ÛD·-Û"yâ Û"(Û"¸3ƒº3ÔÛ"ò.þ«8´
bºA"ñ4«¶C2áC
˜DÜæ5·’6 Eg’6™Fú’6«“GŒ¶Ca’6Aü¾#M *Û"Dä#|Û"ò. ÿ#”)$0ü˜#yº#$¯#Q|Û"ò.
ü¢%‚T¹% ò.DÈ%”)Ĺ%Ä%ºA :-lÄ%'T¬%
$±%ÛŽBlà%”)”) ì%”)|¥&Dª&
yÛ"$¥&Tª&+\Ô&$Ù&¶C$Ô&4Ù&dõ&,ú&˜D$õ& <ú&œõ&$'æ5 :
4'üá&(œá&6
:  üÓ&7  üÎ&= Û¼¸3¸' $®' Û¼¸3" +üï$É4üÒ%Ò
ë7”…% º#L÷$¡Iõ”)ž)ÒŽBÈŠ¸3ź3^Û"öý8!·-Oò.V_«8§ºAjóNæ¶C±˜Dæ5q’6SüÜ)"üÜ) 
¬$ d*$˜*
¬$,*4˜*üÂ)g 5¬$¯*;ü“)œø#$³) ¬$,¥)**î,÷-ƒXYæÓû柬$Ö¬$}½»TyS¥SàTÕ+TœÕ+4à+
ÃNT0Dà+˜'Õ+
ÊL TF$(ø'Ç+APU
ûMÕUfnr~ Ì+ Ûº3¬$º3 Ï+
ÛìV¬$ ú+
Dú+$ü+¥S$

4ü+$Ò, Û¼º3Ü, E 
L†,ËT¬ú+
·ßËTËT 6  
*0 
<©, Û¼º3 'È,

¥)
ü”+È?ºÁÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙº3”ª+ ø#Lœ+ÕU]ÕUÕU­ÕUuÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙìV ÕUÍž) º3G¬$0¦ ËTËT„T7³[ÞÅù&¹œ ±
n¦U{ÏUWœV]¥Sƒ”X#¬$Ϭ$Õ¬$Û4-
-
”õ 
ŒÛ".
H(ž

ÊL¸8*)"&ø(
Ÿ? NS
ûM¸8 d)mq
}
Ü
$
 Û¸3º3
    )


º3¼Ê


ëbÖB8 („Ñ
À)Ê

ž$Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ãJŸÈŸÈ ÈErrorÁ O˜éBLÈ

(ž¢
® À

¡$`Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ˆê)?ÈXM´­Þ`ÅÐa/(P
,ÿ
 ´Ž L• Õ_% 
(|• ¸+Ž ‡`?( ,O)O
 ÇaŽÐa0(q$ „‘ L– Ç4$)\– ¼‘  æ59) 


Ÿý8ý8
ܱ

¸ßý8ý8RI)*0
"


,€
!
º3¼ï
 Õ_ 9!/)„ö À-ï
‡`=)
",
">.†
Ça*Ða1)`
%$­
&
º3´œ

Õ_%9&/$)
¸
‡`$=#)
'#,
'
*
-

+ܽ


Zý8Û_*K+B))ŒÇ

Ça<Ða2)¿à1½
‡`)m( )
,(,
,"!>
Ça¢Ða3)`œæ
Ö¿ãJÞ`ÒãJ ú
#.-'+â%)3&.C-',û
)n.ü–åŠ''¨*¸-*-$
$Þ%5%z%GüÌ ¯üæ •u|¸¿ÆÄÊ
ž¥ ¬¼Ž  ü ú)
07
Äï 4
;B
¼œ
ë
òù
ä½
.`´×·-Û_éè"¸8¸8¸8ë7š ¸8¥ž)zº3 •¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜ÐaãJÛ` Û_Fº3?ž)9o^`âo«ž)"ý8L… ·-ê8 ý8Ô½pÎý8Öwo`Eâorº3kž)ð‚oˆ`ºâoçº3àž)‚oë`M½pÛ_~ž)Ȉ÷ÃwriterÁÎfirstÁÂ
ùÝùb
Ð Ø  Ž |ÍÐa¹ÁßãJŽ i ñÐa¹È ãJšc
Ž ý!Ða¹Ñ3ãJŽ EÐa¹ØWãJŽ ÍiÐa¹ß{ãJ)Ÿý8ý8“] Î]W ™^] ë7
Õ_c
‡`6
Ça<
Õ_Ƈ` ë7·
Ça¬Ç4-æ5±e»Õ_A‡`Ça#Õ_ ‡`|ûhÇaˆ‡`ÉÇaÏè"Kë7 è"Wë7 è"cÛ_iÛ_oÛ_u*„›(
(

~Û"1d$‡
ª},"4‡¼áC>"%d­(
„ª Ö¿Û"¹$D%„Ó
Š}ß|"€3Ó
ÊLüÏüÏýÏSplitÁ€Ðˆ¯v ÁÀ³UEÝk"^bø3Çç{
Š
ûMx
   "©­  ¹ 
V Ûº3«v 

"(
'„´ Ö¿Û"¹$' Å(
Æ!áC
"'Äø´ø
c"ìô Ö¿Û"¹$l%¼Ä
´}º3
º3 "”É9
Ûº3Ô…¤…
]ý8"%ü¨& LÛ"º'¹$¹$ º3ü…J< 
ç[ý8¹$¹$LÛ"º'¤}±}s"ü /ø4…K 
ž$Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ý8¹$´"tx
ü…Klý8Ìßœß6&" [Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
žb¹$; p
¡$Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Û"¹$íÕ'"¯”«
ŠÛ"
$¸"&üÉ' 
 MÛ"º'ãJ¹$±} ü«F
ÈTÛ"¹$MÛ"º'‰‚±}j"ü¾3ø6«G 
ž$Ô€b"$(!4!
ü«G#lÛ"#ü°Ì"[íŒ
΀"*("¦d‡%\&ü‡ 4”
Û"%9&/$)"œ”(!9#ü´ V f( $
Ä %r
%´JYü—¯üîÀüžüܦüê˜Zah¬
x ¼)Ô€¬Þº3Û"²Dº3vÛ"!x¤xé’x´ÂY¼ ’xÇž)`º3º3z¹$KÛ"ÂYž)غ3Ε¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜íý8_œ~°œ~Ý}ü³}ž)í¾ý8•¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜íÛ"Ô€ã7J¸‚)³}1ž)JíRÛ"ãJ
ëJ3Û",Û"B
 inputÁí parsed_flagsÁ°
ù «8É «8È
parsed_flagÁÇ«8ˆ´Ž  ¹R
Ž # "¹^#z‰v3 «v áCÞ
Ðwi
Œx2
“y8
«vS áC×±{¦ø{eé|ûÎ}œ–~Y’6²΀fÍ·¬‚_ò‚΀&»„eÛ"L Û"R ³}ü¬"ä¬
_º3:#ÎL}¹$«Ý}¹$ ©º3}³}ª«8÷³}ÃØ
_ref__flagÁ³}üÌ$ôÌ
aº3:#ðMع$˸‚îº3u³}ý«8³}˜Ú ü‘$ æ5ü’#¬’
ˆÛ"C%y
ü‡7L‡
GÛ"Û_ÃC+ ¿Àü‡¹8HN1`´Í·-Û_·-ZÛ"ý8AÛ_í¡÷:ðp>æ5yøYÍ‘
Û"ßÛ"äÛ_é ¤Ù
JÛ"$¨8Ùò‚> ,>¬Ù
lÛ"
!äÙæ5C  [í¯΀ *ÈüÃ3¬Ãør  üÀ7 Ö¿Û"¹$ øù
üÔ¥Q½ÃÉ! Ô€¬‡º3Û"·ý8·-PÛ"X¤‰¥Ô€Øž) í(Û"á‰VŽ I ¹§
·ô“(ò‚æ5˜΀øKÛ"
Û"$³!
”Ì!TÒ!“],Ì!dÒ!Lõ!H:õ!Î]$ ø:ä!Ÿ9 HM™^ Xae
q
ô $é! Û¸3º3,"   :#4¡",²"
º3¼¡"L¨"Õ_9/ „¨"À;¡"‡`=

 
, ><¸"Çaô Ða`lÎ",Ö"4å"´å"Lì"Õ_% $ö"
|ì"¸=å"‡`? ,UO
>û"Çaô Ðaqœ‰# Ö¿ãJÞ`ô ãJ #Ó2Bž#
l|üËÓê=
S
%ü£!ûü½!áçîõÄ¡"<C J¼å" `´“ ·-Û_L§!è"DÁ!¸8º¸8Ó¸8Êë7ÒànÚž)µº3`LoÕ`âo4º3-ž)²oF`zâož)

÷­ðp±„qù¸ùtÐ ö Ž %ô Ða¹;ô ãJŽ  ô Ða¹B ô ãJÏ“]Î]á™^çë7)Õ_ù‡`ÕÇaÛÕ_V‡`0ë7MÇa<è"§Û_­ë7eè"¹Û_¿ë7wè"ËÛ_Ñ%„„&
 T—&
D—&‰v,dê&$ð&«v,ê&4ð&¼ê&D÷&áC;T÷&%d'
„“' Ö¿Û"¹$ô "„¼',Â'Ðw,¼'È'|TÂ'€?¼'ŒxK ø?°'ã9
HM“y
X  ae  q 
ô $´' Ûº3\â'$ç'«v $â'

4ç'dœ,
„™, Ö¿Û"¹$ ª,
«,|¸(D½(áC
$¸(T½('Äá(´á(±{ìÝ( Ö¿Û"¹$ô "´ˆ*\*
þ|º3
$ˆ*$™*º3 Œ*;ü¸*:ä¸*ØäÕ*º3 )ü´*? Ö¿Û"¹$ô "”š+dš+Í
$§+!ü¸+'
 XÛ"º'‰‚±}üš+FT­+
ÈTÛ"¹$XÛ"º'‰‚±}ƒcü­+3ø@š+G ò‚\".
üš+GlÛ" ) dì+\€, 
üì+ 4ù+»„F<$œù+Aà+[íå΀*ÿ ’, 
ô " &å ? üÁ$ê\l!¡± #V
Rü€&«ˆü×'¼üˆ+.5<Ñ!Ô€¬ò$º3,â$Û">ƺ3õÛ"£x+xkx;ÂYCÀ‡Lž)'º3Òº3$Û'G¹$Ú¹$Û"\Œ+¤‰¸Ô€‘7c«G³}Ož)íÛ"´ãJXëJÛ"Û"'òá‰ô‰Jù$«8¦ «8Ø
°Š½Ž ª¹D‰v~«vRáC1Ðw¼ŒxŠ“y«vóáCw±{FÀ©ØÄÍt¶«(ò‚軄M΀öÛ"ÕÛ"ÛÛ"$Ú+³}ü»+$ô»+˜6ß+Xܹ$º+«òº3q³}«8³}˜}Ú(ˆ0 
º3p¦0ñ$  ¿cQV
‡dgl\y0×` ¹$¥  c cˆ¢cµ
 `£cbufÁ `àB¤GS
ëº3òïµå  ñ$ò­·ú±&1«·ïµ*‰¶F(Á0$8Þ2
ãJD Lº3, 4º3>
J
﵌
ùc ¢ }
´8×1ßãJÒÚº3,4º3> J ﵑ¹)/}BGP º3]c
êcu{Æ0àœ¢©`­·¿Ö¶Èž)к3Ø ãJ+º3ëº3;ïµD Ü»PÜ»çº3º3÷ïµ€¼ =±K__self_0Á©Ö»D
w€¼ïµ[‘¹Œ€¼ïµÞ‘¹éº¤$¸4üÔ5& Øô ãJüÉ52 Ó €66_üé3˜ü¬4ÕüÇ4º¹$$4é
$4»¾,°4ñ$˜«8_flagÁ%÷Ë4ô ãJy»¾£$¯7üË8( Øô ãJüÀ84 Ó ù8ú8aüÞ6œü£7×ü¾7¼¹$$”7»¾$ø6»¾,§7ñ$«8é½!÷Â7ô ãJs»¾Ìô9 Øüé9% Ó :”:cü½9W¹$$Ú9ñ$`( Í º3 î  º3º3&ïµ@  
º3
Û"& 
2 ïµ
ûc§¬œ¡otÈ Òçß `êŽBñÖ¶ùº3º3óïµû³}º3ÓïµÛ ·-å·-ìA±OZ³}ïµRªÄïµ%›Ãx¤Ø áÛ"òvü—[Ö%º3Û"Ð »C¤ áÛ" ë°v®Ö%«º3©Û"§º3}Û"qÐ È»ÌöLº3¬wüêBº3d†ŽB ,]º3[wYº3VŽBT]~\Û"¢xüç;·-ŽB ,^dÛ"u ¡wxu·-rŽBp·-²¡º3¤ÝáC(¬Ü÷yü­JŽB_º38áCŒ¦¬º3¼µ
¼ºáCภð¾ÂyÀ½ŽB»º34º3ÑÚúº3¤¶ áC(Ð zü… KŽB, º3 2áCnŒº3¢
¢ áCÆž É ¤z¢ŸŽBº3º3¬µÕüå)´å
ŒüŸÐÏ}âÏ=~üÈLÐÏRŸâÏâÏÊÏ Œü
ŸâÏâÏ
|ÐÏ 
áá«ãÐ fä»f:z÷™$&ÐÏ”¤
“t€Ñt
ÊLÄlÄlçÇlµ ™lÈl
end_or_lenÁ™lÉl_markerÁ™lŒœjSž€Ñž{øN˜c¦«
ûMýѽÅÉÕç Û €Ñ 
xÐÏ 
ü…!´…ÊÏ& œÝ
ÐÏ
y  üÑ
™úâÏâÏ · O

,üÅ+
T¬üÍßüèÄÐÏâÏýÑ5ýÑiýÐËýÑPÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙëÓž ýѪž)&ëÓÎâÏ$âÏÅâÏa ÐÏËâϪ truncatedÁÔù
«8) &ÄŸâÏâϺ|ÐÏýÐÍÑx÷ÑTšÓ[ÔKÊÏíÔû—Õ×

|ÐÏýÐü¡#ÍÑ3ü¡U
£NýÑÐÏî& ëÓãJhô ÉÙÄÝüÖ l\
~ÐÏ"¤$›íÔE4›ü¡¢
óN£­£­FilterÁ¦­ù§­ predicateÁä9Jÿ ÃW^—ýÑÉÙâÏÐÏî&âÏëÓâÏãJJ¿ô ÕÛü£üˆ;üýÑ´ýÊÏÒ! ÓÔ üÜøÐÏâÏ4ýÚôýÑ#ýÐIâÏ~Å×·ÐÏÀfp|ÐÏýÐÍÑj¿ÙK ÚñíÔÈ÷Ú©ÊÏöÐÏÕÐÏÛ â
wÐÏ*œâáC>¤áõ¬à ÉÙÄ ëÓ Þnº3ŸëÓ±!ûÌÞÆáC¡Ô ²„²íÔ<´¬—Õ¬?"ÂŽâÏ« ÕÛ¨âϤëÓ ©âÏÅ×ÃaccÁ)±,ñÔòíÔÑ—Õ²íÔ
ÐÏ"”ÄíÔEü¶ 
ùøâÏâÏœJ- ÛÜü‰SƒâÏÅ×,—âÏ âϾÅ×öÐÏþ,]íÔB×â"íÔù«ãÙÐϬÐϲ íÔ×â”ÑíÔ@œÐ
—!âÏ?"üÂ!«ã´A" èéü“VâÏÅ×âÏ$âϵâÏãÅ×ÐÏ6gíÔd×âDíÔ ”æ«ãàÐϾÐÏÄœå
ÐÏ+Œü
ŸâÏâÏüå(
¸ßâÏâÏN,ü³`Å× âÏÇâÏÏéé âϨ.O¿ŸâÏâÏ·è
—é³ 

$„!ôë 

Äë 
ˆÐÏ=8L—!„—!$¡!íÔ%4¡!$$«!Ä—!
·ßâÏâÏ^3,2LÃ!

 |¾! Û¼ÐÏ ü”!e$ë! Û¼ÐÏ$ þ!


ÿ!. ü¢ ÝJ!üÛ ¤ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÐÏâÏÐÏ$âÏééÐâÏÙÅ×òéé»ÐÏt´YÞÖöŒësíÔ.ìõÐÏSÐÏZ\œ#Lœ#×├#$¨#íÔ@4¨#Ì•#«ã$•#@#üþ"1´þ"ÊÏ@  ´#µ#üÄ"qˆÐÏ$ï"âÏ$Ú"âÏ«âÏÙÅ× ÐÏ´._×â4íÔ«ãñÊÏÎÐÏ®ÐÏ´|À&DÅ&áC$À&TÅ&&$å& Û¼ÐÏô XOŠ'
ÊLýÐ\Š'|ÐÏýÐ26øOþ& O^cšÓow{ $'ÛëÓ\§'$¬'ÌÞ$§' 
4¬'$¨( Û¼Ðϲ(H
 $¶' œ§'
·ßº3º3
 1  )/  dð',õ'Ô$ð'
<õ'œð'$ý'íÔ<4ý'üÙ'+´Ù'ÊÏ<
üÔ'1 Û¼ÐÏ
ô ûŠüØ%ÚÇÎîdô%º3$å%ˆýÑ9ýÑB¿ÖK×Tž)ëÓÆO³}»º3ó}wÐÏåâÏÅ×BÐ ù«8#Ê·|ÐÏýÐáC=ÌóìšÓóÌÞAèõäÔ¬íÔŒÊÏn¬°*|°*
ÐÏ$À*%Ë*üƒ*H  ç
ù:€™c·>ÐÏ„•*Å×,‹* bòù§Ô‚-¤‚-
!ÐÏ$—-%¢-ŒüÊ,Xà÷ƒš²ì4X¡ÐϬâ,Å×,Ø, v¦û»ì­.Ü­.
0ÐÏÐ.üë-e**î,÷-ƒXYæÓûæŸÐÏä†.LîüŠü×0Ì×0
;ÐÏ$ñ0&ü0Žü”0h55Å7ù8´(M¸svÐÏÔ²0Å×,¨0 b†þ¨\ß1$ä1íÔ$ß14ä1%Œî1
ŸâÏâÏüß1 ìoC!…2üº1K$Ð1Å×,Æ1éé³âÏ»ééâÏš+L±ŸâÏâÏíÔùì¤
\ñ3Lñ3×â”ñ3$ý3íÔ@4ý3\†4$4íÔ$†44‹4üñ3 —ÕbA"&\•4$š4íÔ$•4 4š4& üñ3/ì|M" ¥4¦4 üÇ2ß
$Û2Å×,Ñ2ééëâÏóâÏIÅ×}ÐÏâÏ>ééëâÏóO×â½íÔíÔz—ÕYíÔ,ìÿÐÏÝÐÏã\Ã5$È5íÔ$Ã54È5,Ñ5dÑ5$×5íÔ%4×5ÔÃ5«ão>!%Œá5 
ŸâÏâÏ üÃ5/—éoC" ÷5ø5üì4Œ
$‘5Å×,ú4ÐÏ,5ééèâÏðâÏTâÏ'Å×@ééââÏêP¹
SŸâÏâÏíÔ³íÔ«ãe—éÐÏðÐÏö \“7$˜7íÔ$“74˜7,¡7d¡7$§7íÔ%4§7Ô“7«ão>!%,±7
d±7$·7íÔ
% 4·7$ ü“7*ìK" Â7Ã7ü¾6… $á6Å×,Ê6ÐÏ,Ñ6ééâÏ âÏnâÏAÅ×ZééìâÏôÅ× [¹
^˜íÔÄíÔ«ãvíÔ<ìÐÏðÐÏö$Þ8\Þ8$ã8íÔ&4ã8üÅ8%ÄÅ8Œë<,½8ñ8'üù7xãJ8 ÐÏL…8ÐÏâϺÅ×Ó#VíÔߌëÀÐÏ¡ üŽ:0 $¥:\¥:$ª:íÔ&4ª:üŽ:#´Ž:ÊÏ= ,¸:
£,²:
šÐÏ^?d²:,†:Å:' ½:ü·9Ž Ä:4 ãJØ9¼ŽLÁ9ÐÏ,Ì9ÐÏoÐÏâÏIÅ×cÐÏ|H¹
K¨íÔŒÊÏmÀÒÐÏÐÏ ü”=5 $«=\«=$°=íÔ&4°=ü”=#´”=ÊÏ= ,Ã=
£T¸=
ÐÏ^?Œ¸=,Œ=Ð=' È=ü½<“ Ï=4 ãJÞ<¼ŽLÇ<ÐÏ,Ò<ÐÏoÐÏâÏIÅ×cÐÏ|H¹
K¨íÔŒÊÏm«”ÒÐÏÐÏ ü÷>? $Ž?\Ž?$“?íÔ&4“?ü÷>#´÷>ÊÏ= ,°?
£¤›?
œÐÏ^?Ü›?,ï>½?' µ?ü > ¼?4 ãJÁ>¼ŽLª>ÐÏ,µ>ÐÏoÐÏâÏIÅ×cÐÏ|H¹
K¨íÔŒÊÏm–˜ÒÐÏÐÏÂ,ƒA”—A4œA
ÐÏ$—A,£AlœA”ÈA4ÍA
ÐÏ$ÈA,ÔAlÍAëAü§@ÄãJÒ@¼ŽL®@ÐÏ,¹@,Æ@ãJ¬ãJ+¹
.»3hôšꨛ¼làB\àB Ú,ØBôB'ü—B]˜ãJªB¼ŽL BÐÏC Ú¡Ðψ
$—D\—D$œDíÔ%4œD,¥Dd¥D$«DíÔ%4«DÔ—D«ãm>!ü€D2´€DÊÏ>  ·D¸D+; üËCmÐÏ$ñCÐÏ$ÛCÐÏ,áCâÏÓâÏ5Å×NâÏÅ×,A¹
DíÔ{íÔN«ã/ÊÏÐÏðÐÏöÐÏüÐÏ
$ÓE\ÓE$ØEíÔ%4ØE,áEdáE$çEíÔ%4çEÔÓE—Õm>!ü¼E2´¼EÊÏ>  óEôE+; üŽEfšÐÏ$­EÐÏ$—EÐÏ,EâÏÓâÏ5Å×NâÏÅ×,A¹
DíÔ{íÔN—Õ/ÊÏÐÏðÐÏöÐÏüÐÏ $ÊH\ÊH$ÏHíÔ%4ÏH,ÙHdÙH$ßHíÔ%4ßHlØH”æ9ÜÊH«ã:!ü³H3´³HÊÏ>  ëH ìH+ ;
ü€Hl ÐÏ$¤HÐÏ$ŽHÐÏ,”HâÏÓâÏWÅ×pâÏâÏ>Å×WJ¹
Mˆ íÔ¦íÔy”æZ«ã?ÊÏÐÏÐÏÐÏÐÏ
$ J\ J$¥JíÔ%4¥J,®Jd®J$´JíÔ%4´JÔ J
¹ûâÏâÏxI,ü‰J2´‰JÊÏI  ÀJÁJ+; üÌIuœÐÏ$úIÐÏ$äIÐÏ,êIâÏÞâÏ@Å×YâÏÅ×7A¹
DíÔíÔYª:ÊÏÐÏðÐÏöÐÏüÐÏ$èK\èK$íKíÔ%4íKdçK”æ9üÎK&ÄÎKŒë9  ùKúKü¨KRÐÏ$¿KÐÏ$¶KâϤâÏÒÅ×ê#TíÔ÷”æ׌ë»ÐÏÐÏ¡˜&H ½Q ÏΘ&Ð ­Qê˜&¼Z%CÏΘ&u8::MAXÁ¢&ø ñQVH »RÏΘ&¢&ø «R í¢&ÀZ&>ÏΘ&0 ÎW QÞWñQö¨  !   ˜& Q×W
Îb¸± U&S ‚È‚ÈArgumentÁ„È´ÀbökÏ®ÝWj´ £  ˜&”)Â
ÐÕ
«c”)”) 
ù
ç¨. I
ì¨ 
îb¨\ñö¨ ù
ì¨)  ôW õWø ðV…õ¢© `X ¥W¸±( ŒW̳P “W ̳ùäÈäÈ ArgumentsÁæÈtemplateÁ `çÈÀ `üöMõô]Tdí¶±:¶±Ró±”)Zó±:Ʋl àµx¶±ÊðpÌÀ¥À±0ϱœó²ÌƳº̳}̳0 –Y S¦YñSö¨  !   ¢& SŸY
ÎbÄ· U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴéñö¨ ùì¨)  ¼Y ½Yø ¸X…ø.5 `X íXÄ·( ÔX̳P ÛXë´÷´·v·Žàµˆó±hƲš‰¶£·¬iðpkÀÐÀÜÏÛ·Æó²öƳO̳̳"ä&)2øÏä&(þ7ä&ÈZLkøÏä&u16::MAXÁî&+(øÏä&î&&5î&ÍZJcøÏä&& UÞWñUö¨  !   ä& U×W
Îbܽ U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴ
ñö¨ ùì¨) ±¯Ê®½)0 `«ܽ©̳§ë´÷´Ú½kÚ½ƒàµ}ó±]Ʋ‰¶˜Ú½¡ðpÀÇÀÓvó½¾ó²îƳG̳Ã̳ÊF W¦YñWö¨  !   î& WŸY
ÎbˆÂ U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴ-ñö¨ ùì¨) EC^BŒQ)0 `?ˆÂ=̳;ë´»÷´†Âk†Âƒàµ}ó±]Ʋ‰¶˜†Â¡¢ðp¥ÀÇÀÓ
ŸÂ¾ó²îƳG̳W̳^°'g p  Ñ°'f u °'ÖZŠ ©  Ñ°'u32::MAXÁº'k h  Ñ°'º'f u º'ÛZŠ £  Ñ°'f  YÞWñYö¨  !   °' Y×W
ÎbœÈ U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ ƳM ñö¨ ùì¨) ñ
ï

î
ý
)0 `ë
œÈé
̳ç
ë´Û ÷´šÈkšÈƒàµ}ó±]Ʋ‰¶˜šÈ¡N ðpQ ÀÇÀÓ ³È¾ó²îƳG̳ ̳

 [¦Yñ[ö¨  !   º' [ŸY
ÎbÈÌ U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴm ñö¨ ùì¨) 
ƒ
ž

 
)0 `
ÈÌ}
̳{
ë´û ÷´ÆÌkÆÌƒàµ}ó±]Ʋ‰¶˜ÆÌ¡â
ðpå
ÀÇÀÓJ ß̾ó²îƳG̳ ̳ž ü'«´ÈÒü'ª¦¹ü'äZÎíÈÒü'u64::MAXÁ†(³°ÈÒü'†(®©½†(éZÒëÈÒü'® ]ÞWñ]ö¨  !   ü' ]×W
ÎbäÒ U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴñö¨ ùì¨) 97R6±E)0 `3äÒ1̳/ë´#÷´âÒkâÒƒàµ}ó±]Ʋ‰¶˜âÒ¡ðpÀÇÀÓþûÒ¾ó²îƳG̳K̳RÎ _¦Yñ_ö¨  !   †( _ŸY
Îb× U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴµñö¨ ùì¨) ÍËæÊ´Ù)0 `Ç×Å̳Ãë´C÷´Ž×kŽ×ƒàµ}ó±]Ʋ‰¶˜Ž×¡*ðp-ÀÇÀÓ§×¾ó²îƳG̳ß̳æÈ(ûðÓÈ(úº È($òZ=ðÓÈ( u128::MAXÁÒ(  ðÓÈ(Ò(½Ò($øZ+DðÓÈ( aÞWñaö¨  !   È( a×W
Îb½Ý U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴîñö¨ ùì¨) «Åž)0 `Œ½ÝŠ̳ˆë´|÷´»Ýk»Ýƒàµ}ó±]Ʋ‰¶˜»Ý¡ïðpòÀÇÀÓWÔݾó²îƳG̳¤̳«' c¦Yñcö¨  !   Ò( cŸY
Îbéá U&S ó±c k Ʋz
ˆó² š
Ÿ¨ùç¨. Iì¨ Ƴñ ö¨ ùì¨) &$?#È2)0 ` éá̳ë´œ÷´çákçáƒàµ}ó±]Ʋ‰¶˜çᡃðpÀÇÀÓë€â¾ó²îƳG̳8̳?”)LU—Õ”)KÎZ”),‚[oŽ—Õ”)
usize::MAXÁž)VS—Õ”)ž)QÑ`ž),‰[uŽ—Õ”)Q eÞWñeö¨  !   ”) e×W
Îb‡è U&S ó±c k Ʋz
ˆó² š
Ÿ¨ù!ç¨. I!ì¨ Ƴ8ñ"ö¨ ù!ì¨) ÜÚõÙÙè)0 `Ö‡èÔ̳Òë´Æ÷´…èk…èƒàµ}ó±]Ʋ‰¶˜…è¡9ðp<ÀÇÀÓ¡žè¾ó²îƳG̳î̳õq g¦Yñgö¨  !   ž) gŸY
Îb³ì U&S ó±c k Ʋz
ˆó² š
Ÿ¨ù#ç¨. I#ì¨ ƳXñ$ö¨ ù#ì¨) pnmÜ|)0 `j³ìh̳fë´æ÷´±ìk±ìƒàµ}ó±]Ʋ‰¶˜±ì¡ÍðpÐÀÇÀÓ5Êì¾ó²îƳG̳̳¬0 ÓÔ%¹$0ñ$7>@f´ÃÊÍíÖ $¶@ž«$¼@á¾ ,Â@{´D±C¦ºÞDÓe»í|ï…¼ƒtÆÃ½˜„ÂÆ¾¯|âÏ¿ÅÔ«ÜÀæÔƒíÁ¤„üªÌõÄËôöÅñ´•!ÆÜìHDzÔöWÈÔì…ˆÉܮˣĜ ÌÒăÏœôŽ%Ðÿü¥."ѹü‡8!ÒüÓ§üÓ©;¤;
Generate types for C-style flags with ergonomic APIs.
# Getting started
Add `bitflags` to your `Cargo.toml`:
```toml
[dependencies.bitflags]
version = "2.13.0"
```
## Crate features
The `bitflags` library defines a few Cargo features that you can opt-in to:
- `std`: Implement the `Error` trait on error types used by `bitflags`.
- `serde`: Support deriving `serde` traits on generated flags types.
- `arbitrary`: Support deriving `arbitrary` traits on generated flags types.
- `bytemuck`: Support deriving `bytemuck` traits on generated flags types.
## Generating flags types
Use the [`bitflags`] macro to generate flags types:
```rust
use bitflags::bitflags;
bitflags! {
pub struct Flags: u32 {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
}
}
```
See the docs for the `bitflags` macro for the full syntax.
Also see the [`example_generated`](./example_generated/index.html) module for an example of what the `bitflags` macro generates for a flags type.
### Externally defined flags
If you're generating flags types for an external source, such as a C API, you can define
an extra unnamed flag as a mask of all bits the external source may ever set. Usually this would be all bits (`!0`):
```rust
# use bitflags::bitflags;
bitflags! {
pub struct Flags: u32 {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
// The source may set any bits
const _ = !0;
}
}
```
Why should you do this? Generated methods like `all` and truncating operators like `!` only consider
bits in defined flags. Adding an unnamed flag makes those methods consider additional bits,
without generating additional constants for them. It helps compatibility when the external source
may start setting additional bits at any time. The [known and unknown bits](#known-and-unknown-bits)
section has more details on this behavior.
### Custom derives
You can derive some traits on generated flags types if you enable Cargo features. The following
libraries are currently supported:
- `serde`: Support `#[derive(Serialize, Deserialize)]`, using text for human-readable formats,
and a raw number for binary formats.
- `arbitrary`: Support `#[derive(Arbitrary)]`, only generating flags values with known bits.
- `bytemuck`: Support `#[derive(Pod, Zeroable)]`, for casting between flags values and their
underlying bits values.
You can also define your own flags type outside of the [`bitflags`] macro and then use it to generate methods.
This can be useful if you need a custom `#[derive]` attribute for a library that `bitflags` doesn't
natively support:
```rust
# use std::fmt::Debug as SomeTrait;
# use bitflags::bitflags;
#[derive(SomeTrait)]
pub struct Flags(u32);
bitflags! {
impl Flags: u32 {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
}
}
```
### Adding custom methods
The [`bitflags`] macro supports attributes on generated flags types within the macro itself, while
`impl` blocks can be added outside of it:
```rust
# use bitflags::bitflags;
bitflags! {
// Attributes can be applied to flags types
#[repr(transparent)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Flags: u32 {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
}
}
// Impl blocks can be added to flags types
impl Flags {
pub fn as_u64(&self) -> u64 {
self.bits() as u64
}
}
```
### Renaming flags
The [`bitflags`] macro recognizes a special `#[bitflags(flag_name = "<value>")]` attribute on flags values to rename them:
```rust
# use bitflags::bitflags;
bitflags! {
pub struct Flags: u32 {
// Add the attribute to a flag to change its name
#[bitflags(flag_name = "a")]
const A = 0b00000001;
#[bitflags(flag_name = "b")]
const B = 0b00000010;
#[bitflags(flag_name = "c")]
const C = 0b00000100;
}
}
```
When applied to a flag value, instead of using its identifier, like `A` as the name, it'll use the given string. This
doesn't affect the identifier of the constant itself, just the name recognized when parsing and formatting.
## Working with flags values
Use generated constants and standard bitwise operators to interact with flags values:
```rust
# use bitflags::bitflags;
# bitflags! {
# #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
# pub struct Flags: u32 {
# const A = 0b00000001;
# const B = 0b00000010;
# const C = 0b00000100;
# }
# }
// union
let ab = Flags::A | Flags::B;
// intersection
let a = ab & Flags::A;
// difference
let b = ab - Flags::A;
// complement
let c = !ab;
```
See the docs for the [`Flags`] trait for more details on operators and how they behave.
# Formatting and parsing
`bitflags` defines a text format that can be used to convert any flags value to and from strings.
See the [`parser`] module for more details.
# Specification
The terminology and behavior of generated flags types is
[specified in the source repository](https://github.com/bitflags/bitflags/blob/main/spec.md).
Details are repeated in these docs where appropriate, but is exhaustively listed in the spec. Some
things are worth calling out explicitly here.
## Flags types, flags values, flags
The spec and these docs use consistent terminology to refer to things in the bitflags domain:
- **Bits type**: A type that defines a fixed number of bits at specific locations.
- **Flag**: A set of bits in a bits type that may have a unique name.
- **Flags type**: A set of defined flags over a specific bits type.
- **Flags value**: An instance of a flags type using its specific bits value for storage.
```
# use bitflags::bitflags;
bitflags! {
struct FlagsType: u8 {
// -- Bits type
// --------- Flags type
const A = 1;
// ----- Flag
}
}
let flag = FlagsType::A;
// ---- Flags value
```
## Known and unknown bits
Any bits in a flag you define are called _known bits_. Any other bits are _unknown bits_.
In the following flags type:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const A = 1;
const B = 1 << 1;
const C = 1 << 2;
}
}
```
The known bits are `0b0000_0111` and the unknown bits are `0b1111_1000`.
`bitflags` doesn't guarantee that a flags value will only ever have known bits set, but some operators
will unset any unknown bits they encounter. In a future version of `bitflags`, all operators will
unset unknown bits.
If you're using `bitflags` for flags types defined externally, such as from C, you probably want all
bits to be considered known, in case that external source changes. You can do this using an unnamed
flag, as described in [externally defined flags](#externally-defined-flags).
## Zero-bit flags
Flags with no bits set should be avoided because they interact strangely with [`Flags::contains`]
and [`Flags::intersects`]. A zero-bit flag is always contained, but is never intersected. The
names of zero-bit flags can be parsed, but are never formatted.
## Multi-bit flags
Flags that set multiple bits should be avoided unless each bit is also in a single-bit flag.
Take the following flags type as an example:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const A = 1;
const B = 1 | 1 << 1;
}
}
```
The result of `Flags::A ^ Flags::B` is `0b0000_0010`, which doesn't correspond to either
`Flags::A` or `Flags::B` even though it's still a known bit.
Á@f´ÃÊÍíhÖ iž«há¾ g{´f¦ºÞe»íd¼ƒb½˜`¾¯^¿Å\ÀæZÁXªVÄËUÅñTÆSDzRÈÔQÉOË£NÌÒMÏœLÐÿKѹIÒâ å è 4­@ß â Ô × É Ì dË@üQL
Yield the bits of a source flags value in a set of contained flags values.
Á$Ó@ *5«$_á ¾ ,e{
,W)+Ü—ün¨£
An iterator over flags values.
This iterator will yield flags values for contained, defined flags first, with any remaining bits yielded
as a final flags value.
Á  ÍìÛ" §Û"§":€™c·>
')œ¹  è"TÒ  ´áéµ æ{Û"§"üþ$Œà àÛ"§" 
Û"÷=ÄŠéµ ùµ<§"üà\œí ô.Û"Û"§"
Û"÷ùš üÇ#éµ Ìû¶§"úMûM Û"ü…($ˆá á§"Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ§"úM 
Û"$üø
ü¥ ÒÍ
An iterator over flags values.
This iterator only yields flags values for contained, defined, named flags. Any remaining bits
won't be yielded, but can be found with the [`IterNames::remaining`] method.
Áéµ ùµ<è" ²ì4X¡')̟績”)LÎÛ"dÝÛ"Üî  éµ óû¶è"!ü$žâ âÛ"è" ©Ó,÷ƒì€##éµ ùµ<ˆè"$%üÙ\œæç¸Û"Û"è"""€.÷LUš^ìËü³JG Get a flags value of any remaining bits that haven't been yielded yet.ÁúüŠ>; Once the iterator has finished, this method can be used toÁüÍB? check whether or not there are any bits that didn't correspondÁü”2/ to a contained, defined, named flag remaining.ÁLÒã ãè" ãÛ"" Ü"Ç4üŒ(''éµ û¶,”è"()úMûM) && Û"üß(ä äè"Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙè"úM& ç&
)Û"ü“"'üØ ºµ
An iterator over all defined named flags.
This iterator will yield flags values for all defined named flags, regardless of
whether they are contained in a particular flags value.
Á„ž"++éµ ¯"ùµ<²"º#XYæÓûæŸ,-%'ÌÁ",Á"**ç¸Tà"à"**”)üï""//éµ ô"û¶,÷"º#0ܘ#¦#º#..
0Û"ü•$/22éµ š$û¶,$º#34úMûM4 LË$$Ð$11ØÄüï$($ò$å åº#Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙº#úM1 ÷$1
4Û"$ü$ü‚(#ü¼'E@
An iterator over all defined names for a specific flags value.
Át(¥66Íì¬$ œ({¬$,Ÿ(ø#(M¸sv78+-Ô¬(,¬(55TlÌ($Ì(55ËTüÞ( ¥::¶Ì ã(ÆÌ,æ(ø#;ü“)$¡)æ æ¬$ø#9 ¬)9
;¬$»Š)ü³*-¥==¶Ì ¸*ÆÌ,»*ø#>?úMûM? Lç*$ì*<<ÚÄü”+($—+ç çø#Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙø#úM< œ+<
?¬$$¡+tÙ@üÁ¼
Parsing flags from text.
Format and parse a flags value as text using the following grammar:
- _Flags:_ (_Whitespace_ _Flag_ _Whitespace_)`|`*
- _Flag:_ _Name_ | _Hex Number_
- _Name:_ The name of any defined flag
- _Hex Number_: `0x`([0-9a-fA-F])*
- _Whitespace_: (\s)*
As an example, this is how `Flags::A | Flags::B | 0x0c` can be represented as text:
```text
A | B | 0x0c
```
Alternatively, it could be represented without whitespace:
```text
A|B|0x0C
```
Note that identifiers are *case-sensitive*, so the following is *not equivalent*:
```text
a|b|0x0C
```
Á4á@GJNQSVY\ÓÔØ× `@BWriteÁ,üêb@CÖ $ž@E¾ ,—{@FWðEG,‰:<(*ü–tü up
Write a flags value as text.
Any bits that aren't part of a contained flag will be formatted as a hex number.
ÁLè èÛ"Û_`HÖIIH ¸éµ §ÍìÛ_û¶Yý8DêbÛ_Í‘÷¡6ðp4ÀKMHJü´\ü¡
Parse a flags value from text.
This function will fail on any names that don't correspond to defined flags.
Unknown bits will be retained.
ÁD»é éÔ€KK Õéµ Äû¶\ý8D‡ô“á‰ûB%'¨J<closure_kind>ÁL<closure_signature>ÁL<upvars>ÁLLJÝ}ÉJ•ÚM­ÚMÊÚMMJ¸‚ü‡yüÈ>9
Write a flags value as text, ignoring any unknown bits.
Á”Žê êÛ"Û_`OÖPPO ²éµ ¡÷×û¶ØØ
NÛ"Û_÷àHðpéH<>ACüÔeüÂŒ
Parse a flags value from text.
This function will fail on any names that don't correspond to defined flags.
Unknown bits will be ignored.
ÁŒÛë ëÔ€RR þéµ íû¶ÓÚ
QÛ"በK#%üË^üûOJ
Write only the contained, defined, named flags in a flags value as text.
Á„Òì ìÛ"Û_`TÖUUT ôéµ ã÷×T„ û¶Ø,‰
SÛ"Û_÷£Oðp4ü57:<üÁ$Fü # 
Parse a flags value from text.
This function will fail on any names that don't correspond to defined flags.
This function will fail to parse hex values.
Á|È$í íÔ€WW é$éµ Ø$û¶,Û$
VÛ"ቔW¸+V•ÚX­ÚXÊÚXXV«”’-ü­,d_
Encode a value as a hex string.
Implementors of this trait should not write the `0x` prefix.
ÁDœ-YYÎìÐÏü’-xYÒæÒæZZZüË-=Ü«- Write the value as hex.ÁLÎ-î îÐϨ`Y¨[[ ç-YÍìÜç Ø-êbÜçTÛ-
ZÐÏÜç$è-ðp4î-/1”´.üŒ.'"
Parse a value from a hex string.
ÁD¾.\\Òæü´.‘\ÒæÒæ]]]üï.TìÍ. Parse the value from hex.ÁLò.ï ïÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÐϹ$\ ƒ/\ÍìÐÏ,½/
]ÐÏá‰,ü.|¦3¹$_acüé38ü¼3(% An invalid hex flag was encountered.Á„ð3»¾¹$^é
``^Í컾Œ‡4Äc»¾dŒ4
_»¾«8Á^#%üÞ6:ü‡6RO A named flag that doesn't correspond to any on the flags type was encountered.Á”å6»¾¹$^é
bb^°ìŒþ6Áìdƒ7
a»¾«8°_ü½9!ü€985 A hex or named flag wasn't found between separators.ÁTÊ9¹$^^±{ü˜: ¹$eÅceü¿:8Â:ðñò ð¹$ ñ c cˆ¢cµ
 `£c÷µ `àB¤GS
ò`d Æ:d
e$Ç:± Í:Tê@4î@¡£¦¯°á× `fhBitAndÁ4öøfjBitOrÁ,'–úfkBitXorÁ4.¶ûflNotÁ6•!fmù$QfoTdÓfq¯
Dp\fr
DzYfs$¸Ä¥§|~jl,D_aìDUWGI:<|“uuéµ ˜Ö%vwxyzü—6ü©id
Define a flag.
If `name` is non-empty then the flag is named, otherwise it's unnamed.
Á¤ÚÄÛ"Ö%tt
vÛ"Ð Gb»Pbüê(üømh
Get the name of this flag.
If the flag is unnamed then the returned string will be empty.
Á$÷ó óÖ%ÚÄt üt¶Cüçü²0+
Get the flags value of this flag.
Á,ôô ôÖ% ôÛ"t út˜Dü­$ü¨{
Whether the flag is named.
If [`Flag::name`] returns a non-empty string then this method will return `true`.
ÁDºõ õÖ%t ÃtóNü… &üýƒ~
Whether the flag is unnamed.
If [`Flag::name`] returns a non-empty string then this method will return `false`.
ÁT’ ö öÖ%t t
zÛ"üï üÔ š 
A set of defined flags using a bits type as storage.
## Implementing `Flags`
This trait is implemented by the [`bitflags`](macro.bitflags.html) macro:
```
use bitflags::bitflags;
bitflags! {
struct MyFlags: u8 {
const A = 1;
const B = 1 << 1;
}
}
```
It can also be implemented manually:
```
use bitflags::{Flag, Flags};
struct MyFlags(u8);
impl Flags for MyFlags {
const FLAGS: &'static [Flag<Self>] = &[
Flag::new("A", MyFlags(1)),
Flag::new("B", MyFlags(1 << 1)),
];
type Bits = u8;
fn from_bits_retain(bits: Self::Bits) -> Self {
MyFlags(bits)
}
fn bits(&self) -> Self::Bits {
self.0
}
}
```
## Using `Flags`
The `Flags` trait can be used generically to work with any flags types. In this example,
we can count the number of defined named flags:
```
# use bitflags::{bitflags, Flags};
fn defined_flags<F: Flags>() -> usize {
F::FLAGS.iter().filter(|f| f.is_named()).count()
}
bitflags! {
struct MyFlags: u8 {
const A = 1;
const B = 1 << 1;
const C = 1 << 2;
const _ = !0;
}
}
assert_eq!(3, defined_flags::<MyFlags>());
```
Á{{„ë,€ÐÏ{„ë"Ò„„ë.Ò„)|}~ƒˆŠŒŽ˜šœ|}~ƒˆŠŒŽ˜šœÍìâÏ„ƒžâÏþ…šŠƒœŒ˜ˆŽ~ü¸"ì– The set of defined flags.Á,¾{{ ÿÐìá The underlying bits type.Á$ˆ{{”Èü™*' Get a flags value with all bits unset.Á,ËÐÏ{{ Ú„Íüš.+ Get a flags value with all known bits set.ÁÐÐÏ{{×â´Üü²96 Get a flags value with all bits from named flags set.Áðúüø_\ This method is equivalent to [`Flags::all`] unless [`Flags::FLAGS`] contains unnamed flags.ÁLßÐÏ{{
ÐÏݕڭÚÊÚÉÙ•Ú­ÚÊÚÕÛü‰"üÚ*' Get the known bits from a flags value.ÁTŒ÷ ÷ÐÏâÏ{ {
ƒÐÏü“$üâ,) Get the unknown bits from a flags value.Ádø øÐÏâÏ{ £{·èü³'üï?< This method will return `true` if any unknown bits are set.Á¬¶ù ùÐÏ{ Ì{
ÐÏìü™" Get the underlying bits value.ÁÀúüÈC@ The returned value is exactly the bits set in this flags value.Á$“ú úÐÏâÏ{ ˜{íÔ$™ü¢ .ô³ Convert from a bits value.ÁÖúüÞ?< This method will return `None` if any unknown bits are set.ÁL¥ âÏî{{
ÐÏ´âvüÄ"/ü…":7 Convert from a bits value, unsetting any unknown bits.Á”Ç"âÏÐÏ{{Œë´xxüæ#.ü»#&# Convert from a bits value exactly.Á„é#âÏÐÏ{{ÊÏ´$ú#üØ%(üš$FC Get a flags value with the bits of a flag with the given name set.Áå$úüí$@= This method will return `None` if `name` is empty or doesn'tÁü²%! correspond to any named flag.ÁLÛ%û ûî{ ë%{
ŠÐÏÐ g{üƒ*"ü¸(*' Yield a set of contained flags values.Áç(úüï(VS Each yielded flags value will correspond to a defined named flag. Any unknown bitsÁüÊ)41 will be yielded together as a final flags value.Á$†*ü üÐÏ©ú{ ‹*{
ÐÏ$Œ*üÊ,-üÑ*0- Yield a set of contained named flags values.Á†+úüŽ+ZW This method is like [`Flags::iter`], except only yields bits in contained named flags.Áüí+XU Any unknown bits, or bits not corresponding to a contained flag will not be yielded.ÁTÍ,ý ýÐÏÝû{ Ø,{
ŒÐÏ$Ù,üë-7ü¨->; Yield a set of all named flags defined by [`Self::FLAGS`].Á”î-žý{{
ÐÏü”08üÖ.@= Get an iterator over all defined names for this flags value.Á/úü£/MJ This iterator will yield all defined names for the flags value, includingÁÔõ/ any convenience flags.Á„—0þ þÐϽþ{ ¨0{
ŽÐÏ$©0Ôº1ü‚130 Whether all bits in this flags value are unset.ÁD½1ÿ ÿÐÏ{ Æ1{
ÐÏ$Ç1ÄÇ2ü‹274 Whether all known bits in this flags value are set.Á4Ê2 ÐÏ{ Ñ2{
ÐÏ$Ò2üì4Hü¬4;8 Whether any set bits in `other` are also set in `self`.ÁTï4 ÐÏÐÏ{ ú4{„ë,®5
ÐÏ$û4¹
jƒü¾6Füþ5;8 Whether all set bits in `other` are also set in `self`.ÁDÁ6 ÐÏÐÏ{ Ê6{„ë,þ6
ÐÏ$Ë6¹
d…üù75üÉ7+( Remove any unknown bits from the flags.ÁDü7ƒ ƒÐÏãJ{ …8{„ë,¨8
ÐÏ$Š8ü·9@ü÷8;8 The bitwise or (`|`) of the bits in `self` and `other`.Á4º9 ÐÏÐÏãJ{ Á9{„ë,ñ9ôš$Æ9¹
vˆü½<@üË:EB The intersection of `self` with the complement of `other` (`&!`).Á•;úü;WT This method is not equivalent to `self & !other` when `other` has unknown bits set.Áüù;?< `remove` won't truncate `other`, but the `!` operator will.Á4À< ÐÏÐÏãJ{ Ç<{„ë,÷<¨›$Ì<¹
aŠü >@üÖ=EB The bitwise exclusive-or (`^`) of the bits in `self` and `other`.Á4£> ÐÏÐÏãJ{ ª>{„ë,Ú>
ÐÏ$¯>¹
Z‰ü§@JüÃ?_\ Call [`Flags::insert`] when `value` is `true` or [`Flags::remove`] when `value` is `false`.Áª@ ÐÏÐÏãJ{ ®@{„ë,ë@
ÐÏ$³@¹
øˆ»÷ˆü—B2üñA! Unsets all bits in the flags.Á,šBˆ ˆÐÏãJ{  B{„ë,ÃB
˜ÐÏ$¥BüËC*üúB<9 The bitwise and (`&`) of the bits in `self` and `other`.Á.\»CdÎCÐÏÐÏÐÏ{{
ÐÏà‡¹
݇üŽE#ü¾D;ñ¥.\þD,EÐÏÐÏÐÏ{{Àx†¹
u†ü€H(üúEE™§ÄFúüÌFWô§ü¨GC@ `difference` won't truncate `other`, but the `!` operator will.Á.\ðGTƒHÐÏÐÏÐÏ{{«”U…¹
R…üÌI2üòHEª.\¼I¤ÏIÐÏÐÏÐÏ{{–˜σ¹
̃ܨKüÇJLI The bitwise negation (`!`) of the bits in `self`, truncating the result.Á.\˜KT«KÐÏÐÏ{{
ÐÏ
ƒü¿LºüþK@;
A bits type that can be used as storage for a flags type.
Á$ÉLžž
„ë,æMØÐÏ,ÓLŠ ÐÏ$ßLµßÐÏÐÏLêLöøÐÏÐϬúLÐÏÐÏøøÐÏlM–úÐÏÐϤ–MÐÏÐϘúÐÏlœM¶ûÐÏÐϬ±MÐÏÐϸûÐÏl¸M•!ÐÏ”ÍMÐÏ–!ÐÏlÑMÒ„<òMž„ëÿºµõʵëÚµÜïµÍ„¶»œ¶¬±¶šÉ¶Þ¶yö¶o†·bÒ„`„ëMºµDʵ;Úµ-﵄¶œ¶±¶ïɶàÞ¶Îö¶Ć··Ò„µŸ Ÿ Œ¥Nü€N  A value with all bits unset.Á,«NžžÐÏ|àNô½N A value with all bits set.ÁæNžžÐÏœ€PLŠP¡¡Òæ´€P¡ÒæÒæ´˜PL¥P ¯P ¨Z µP ÇP, ¶P ·P ÅP
, ¸P8À ¹P& ºP8´»P$ ½P, ¿P8´ ÀP& ÁP8´ÂP$ ÄP
ÆP*ÉP ÌP ¦Z, ÖP ×P ŸZ08$åP8Ö $êP8
ïP, óP8À ôP öP ÔQ8,ˆQ8Ó,ŽQ& “Q, •Q8À Q ˜Q7ˆ šQ% Q8,­Q8à³Q& ¶Q, ¸Q8À ¹Q »Q ½Q, ¾Q8À ¿Q ÀQ'ÁQ8MAXÁÃQ% ÆQ8$ãQ8Ö $èQ8
íQ, ñQ8´ òQ ôQ ØR8,†R8Ó,ŒR& R, “R8´ ”R R7ˆ ˜R% ™R8,«R8à±R& ´R, ¶R8´ ·R ¹R »R, ¼R8À ½R ¾R'¿R8ȼÁR8ÅR, ÈR8´ ÉR% ÊR8$çR8¯
DìR8
õR, ùR8À úR üR ÉT 8 ŽS8¾
LS šS ¦S8á‰,S&  S ¢S8É£S(¨S8Í4«S ±S8$²S$ ¶S8T¸S ÂS ÄS »T
 ÚS, ÛS8À ÜS ÝS'ÞS8from_str_radixÁtàS îS øS8á‰,ïS$ ôS716ÁöS ùS8Ù<úS T ©T T8 ƒT „T8T†T'T8Ò
„’T ¢T ¨T8á‰,£T8$ØT8¯
DÝT8
æT, êT8´ ëT íT ºV 8 ÿT8¾
LU ‹U —U8á‰,ŒU& U “U8É”U(™U8Í4œU ¢U8$£U$ §U8T©U ³U µU ¬V
 ËU, ÌU8´ ÍU ÎU'ÏU8ãÀtÑU ßU éU8á‰,àU$ åU7ÁçU êU8Ù<ëU òU šV óU8 ôU õU8T÷U'V8Ò
„ƒV “V ™V8á‰,”V8$ÉV8
DÎV8
×V, ÛV8À ÜV ÞV X8 ðV8˜
LóV üV8¨ ýV& þV8×€W'ƒW8¶Ô,…W ŠW W  W ŒW8$W$ W8“W8ðp4—W& W8¨ ŸW(¢W8×¥W'¨W8Í4ªW ±W ôW8writeÁ,ÇW ÌW ÍW âW8ðp4ÎW$ ÔW7{:x}Á4ÖW$ ÜW8$ÞW8$X8
DX8
ŸX, £X8´ ¤X ¦X ÊY8 ¸X8˜
L»X ÄX8¨ ÅX& ÆX8×ÈX'ËX8¶Ô,ÍX ÒX ÓX èX ÔX8$ÕX$ ÙX8ÛX8ðp4ßX& åX8¨ çX(êX8×íX'ðX8Í4òX ùX ¼Y8ÀÇ,Y ”Y •Y ªY8ðp4Y$ œY7÷Ç4žY$ ¤Y8$¦Y8$ÙY8êLÞY8
èY, ìY8´ íY ïY ðY8$þY8êLƒZ8
Z, Z8À Z ”Z •Z
 Z¬ô[ü“[>; A trait for referencing the `bitflags`-owned internal typeÁüÒ[! without exposing it publicly.Á\þ[££Òæüô[¼£ÒæÒæ ¤¥¤¥ÍìÐϤԼ\¡ÁÎLÌ\¹ÎÑÎÍìÐÏ¥t ]îÎ̼\ü\'$ The type of the underlying storage.ÁLÁ\££l ]üÜ\?< The type of the internal field on the generated flags type.ÁD¥]££ü÷]64¸]use the `Flags` trait insteadÁüÕ]üÁ]5D^ÙϦ¦Òæü÷]½¯ÐÏÔ‹^{ÐÏ,¨^¦Òæ9´Ñ-ÄÑ$ÒæK´Ñ?ÄѨ§¨ÍìÐϧü÷^!ùM˜Ò¬‚_˜ÒúMÐÏ\‹_Ò,©Ò!¹ÒÍìÐϨüü_6ùMçÒüŒ`%çÒúMÚÄÐÏÜ•`ßÒ2øÒ'‰Óü÷^ ü´^>; An iterator over enabled flags in an instance of the type.Á$ü^ÙϦ¦üü_5üž_YV An iterator over the raw names and bits for enabled flags in an instance of the type.ÁL`ÙϦ¦ìË`ªªéµ Ð`û¶,Ó`Û"«¬§¨Lï`$ô`©©§"taLa©©è"ü¼a/®®éµ Áaû¶,ÄaÛ"ü“d$üðaeb A marker trait that signals that an implementation of `BitFlags` came from the `bitflags!` macro.ÁÖbúüÚbc` There's nothing stopping an end-user from implementing this trait, but we don't guarantee theirÁü¾cEB manual implementations won't break between non-breaking releases.Á4ŠdÔd¯¯Òæü“d'¯ÒæÒæļdLËdûÔëd¯²Š\‡e£³,ãd%'Œ†A4ý@LŽAí$ÔB¸ûg¯·²Ši£·³,Bœ˜BŒ°BBDDþB„©Cît¬ÆeüÆQïê
Generate a flags type.
# `struct` mode
A declaration that begins with `$vis struct` will generate a `struct` for a flags type, along with
methods and trait implementations for it. The body of the declaration defines flags as constants,
where each constant is a flags value of the generated flags type.
## Examples
Generate a flags type using `u8` as the bits type:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const A = 1;
const B = 1 << 1;
const C = 0b0000_0100;
}
}
```
Flags types are private by default and accept standard visibility modifiers. Flags themselves
are always public:
```
# use bitflags::bitflags;
bitflags! {
pub struct Flags: u8 {
// Constants are always `pub`
const A = 1;
}
}
```
Flags may refer to other flags using their [`Flags::bits`] value:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const A = 1;
const B = 1 << 1;
const AB = Flags::A.bits() | Flags::B.bits();
}
}
```
A single `bitflags` invocation may include zero or more flags type declarations:
```
# use bitflags::bitflags;
bitflags! {}
bitflags! {
struct Flags1: u8 {
const A = 1;
}
struct Flags2: u8 {
const A = 1;
}
}
```
# `impl` mode
A declaration that begins with `impl` will only generate methods and trait implementations for the
`struct` defined outside of the `bitflags` macro.
The struct itself must be a newtype using the bits type as its field.
The syntax for `impl` mode is identical to `struct` mode besides the starting token.
## Examples
Implement flags methods and traits for a custom flags type using `u8` as its underlying bits type:
```
# use bitflags::bitflags;
struct Flags(u8);
bitflags! {
impl Flags: u8 {
const A = 1;
const B = 1 << 1;
const C = 0b0000_0100;
}
}
```
# Named and unnamed flags
Constants in the body of a declaration are flags. The identifier of the constant is the name of
the flag. If the identifier is `_`, then the flag is unnamed. Unnamed flags don't appear in the
generated API, but affect how bits are truncated.
## Examples
Adding an unnamed flag that makes all bits known:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const A = 1;
const B = 1 << 1;
const _ = !0;
}
}
```
Flags types may define multiple unnamed flags:
```
# use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const _ = 1;
const _ = 1 << 1;
}
}
```
Á(|¶eã~ Üe ýƒ  âe Îg, ìe íe üe+ îe ïe ûe, ðe8outerÁ,ñe& öe8û$÷e
ýe, ‡f8ƈf& f8ÆŒf84f, —f8´D˜f&  f8¼,¡f& ¦f, ¨f8¥ ©f& ªf8´«f ®f µg, ¼f ½f ªg, Ïf Ðf íf+ Ñf Òf ìf, Óf8ù,Ôf& Ùf8¼,Úf, àf áf êf, âf8À$ãf& çf8¯èf
ëf
îf8,€g, †g8«$‡g& g8¯Œg g, g8»,g& —g8$˜g% œg
«g, Àg Ág Çg, Âg8¿ Ãg& Äg8¯Åg
Èg*Ðg Óg Öx, Éh8,Êh'Ïh8ªÌÑh êh ìh ²i, úh ûh …i+ üh ýh „i, þh8ÿî,ÿh
†i, ”i8Æ•i84™i,  i8´D¡i+ ½i ¾i Úl8«,¿i Äi Ùl"8LÒi$ Ûi8±Téi$ ói8unused_doc_commentsÁœj$ ”j8unused_attributesÁŒ¢j$ ³j8
unused_mutÁTÁj$ Ëj8žtÙj$ çj8non_upper_case_globalsÁ´õj$ k84™k'Ÿk8min_ident_charsÁ|¡k$ °k84¾k'Äk8assign_op_patternÁŒÆk$ ×k84åk'ëk8indexing_slicingÁ„ík$ ýk84l'l8same_name_methodÁ„“l$ £l84±l'·l8iter_without_into_iterÁ´¹l$ Ïl8,äl8 êl& ël íl îl ðl òl •x*, ‰n8,Šn'n8Ü‘n ¬n ®n ín, Àn8ÆÁn84Ån8InternalBitFlagsÁ„Ìn& Ün, Þn8¥ ßn, ün8,ýn'o8Ôì„o ¡o £o ïp, µo8´D¶o& ¾o, Ào8¥ Áo Ão áp, Ùo Úo Îp
, ôo õo ‰p+ öo ÷o ˆp, øo8ù,ùo, ÿo €p †p, p8À$p
‡p
Šp8,¤p, ªp8«$«p °p, ²p8»,³p% ¸p
Ïp, þp8,ÿp'„q8£Ćq žq  q þr8Àù„²q& Âq, Äq8¥ Åq$ Æq, Èq8´DÉq Òq ðr, èq éq Ýr
, ƒr „r ˜r+ …r †r —r, ‡r8ù,ˆr, Žr r •r, r8À$r
r
™r8,³r, ¹r8«$ºr ¿r, Ár8»,Âr% Çr
Þr, Ùs8,Ús'ßs8ÒÄás ùs ûs Ðu8Àùt& t, Ÿt8¥  t$ ¡t, £t8´D¤t ­t Âu, Ãt Ät ¯u, Þt ßt ót+ àt át òt, ât8ù,ãt, ét êt ðt, ët8À$ìt
ñt
ôt8,Žu, ”u8«$•u% ™u
°u, ßu8,àu'åu8Ëôçu …v ‡v Åv, ™v8´Dšv& ¢v, ¤v8¥ ¥v$ ¦v8Àù„¨v, Ôv8,Õv'Úv8²ÔÜv öv øv  w, Šw8´Dw, ¯w8,°w'µw8Ü·w Òw Ôw x, æw8´Dçw& ïw, ñw8¥ òw$ ów, õw8´Döw% x, ¡x8,¢x'§x8ÞD©x ±x ³x Ðx, Áx Âx Åx, Ãx8¿ Äx
Æx% ×x Ýx ¾z, çx èx ÷x+ éx êx öx, ëx8ÿî,ìx& ñx8û$òx
øx8$y, ‡y8´Dˆy& y8¼,y& y, ˜y8¥ ™y& šy8´y žy ¥z, ¬y ­y šz, ¿y Ày Ýy+ Áy Ây Üy, Ãy8ù,Äy& Éy8¼,Êy, Ðy Ñy Úy, Òy8À$Óy& ×y8¯Øy
Ûy
Þy8,ðy, öy8«$÷y& ûy8¯üy ÿy, z8»,z& ‡z8$ˆz% Œz
z, °z ±z ·z, ²z8¿ ³z& ´z8¯µz
¸z*Àz Ãz ìƒ+ Íz Îz ž}8«,Ïz Ôz }8Lâz$ ëz8±Tùz$ ƒ{8‰õœ‘{$ ¤{8®õŒ²{$ Ã{8ÑõTÑ{$ Û{8žté{$ ÷{8ÿõ´…|$ |84©|'¯|8¹ö|±|$ À|84Î|'Ô|8ìöŒÖ|$ ç|84õ|'û|8‰ø´ý|$ “}8,¨}8 ®}& ¯} ±} ²} ´} ¶} «ƒ, Ä}8,Å}'Ê}8ÔìÌ} é} ë} ·, ý}8´Dþ}& †~, ˆ~8¥ ‰~ ~ ©, ¡~ ¢~ 
, ¼~ ½~ Ñ~+ ¾~ ¿~ Ð~, À~8ù,Á~, Ç~ È~ Î~, É~8À$Ê~
Ï~
Ò~8,ì~, ò~8«$ó~ ø~, ú~8»,û~% 
, Æ8'Ì8ñ´Î ä æ Û , ø ù ƒ€+ ú û ‚€, ü8ÿî
„€, –€8´D—€& Ÿ€, ¡€8¥ ¢€$ £€, ¥€8´D¦€ ¯€ Í, Å€ Æ€ º
, à€ á€ õ€+ †〠ô€, ä€8ù,å€, ë€ ì€ ò€, í€8À$î€
ó€
ö€8,, 8«$— œ, ž8»% ¤
», ê8'ð8²Ôò Œ‚ Ž‚ ¶‚,  ‚8´D¡‚, Å‚8,Æ‚'Ë‚8ÜÍ‚ è‚ ê‚ ¡ƒ, ü‚8´Dý‚& …ƒ, ‡ƒ8¥ ˆƒ$ ‰ƒ, ‹ƒ8´DŒƒ% ¬ƒ, ·ƒ8,¸ƒ'½ƒ8ÞD¿ƒ ǃ Ƀ æƒ, ׃ ؃ Ûƒ, Ùƒ8¿ Úƒ
܃% íƒ óƒ ôƒ*öƒ ùƒ úƒ% ûƒäâ…ü€„*' Implement functions on bitflags types.Á«„úü¯„^[ We need to be careful about adding new methods and trait implementations here because theyÁüŽ…41 could conflict with items added by the end-user.Á(|Ã…4Ù…ò’ ÿ… ¡µ …† ¦‘(8paramsÁ4•‡& ›‡, 8$ž‡& ¢‡8¼,£‡$ ¨‡, ª‡8´$«‡& ¯‡8¼,°‡$ µ‡, ·‡8Ð $¸‡& ¼‡8¼,½‡$ ‡, ć8¹
,Ň& ʇ8¼,ˇ$ Ї, Ò‡8»,Ó‡& ؇8¼,Ù‡% Þ‡, è‡ é‡ ø‡+ ê‡ ë‡ ÷‡, ì‡8ÿî,í‡& ò‡8û$ó‡
ù‡, ƒˆ8PublicBitFlagsÁt„ˆ& ’ˆ8¼,“ˆ& ˜ˆ, šˆ8¥ ›ˆ& œˆ8´ˆ  ˆ  ‘Œ8 ®ˆ8á ,±ˆ ¶ˆ ·ˆ, ¹ˆ8
empty_bodyÁTºˆ& Ĉ8¸,ň8 ׈8£Úˆ ݈ Þˆ, àˆ8all_bodyÁDáˆ& éˆ8¸,êˆ8 üˆ8´$ÿˆ ƒ‰ ‰‰ „‰8$…‰, ‹‰8 bits_bodyÁLŒ‰& •‰8¸,–‰8 ¨‰8Õ
L«‰ ´‰ ¹‰8´$µ‰, »‰8from_bits_bodyÁt¼‰& ʉ8¸,ˉ8 ݉8å
”à‰ ò‰ ÷‰8´$ó‰, ù‰8from_bits_truncate_bodyÁ¼ú‰& ‘Š8¸,’Š8 ¤Š8þ
„§Š ·Š ¼Š8´$¸Š, ¾Š8from_bits_retain_bodyÁ¬¿Š& ÔŠ8¸,ÕŠ8 çŠ8LêŠ óŠ øŠ8Ð $ôŠ, úŠ8from_name_bodyÁtûŠ& ‰‹8¸,Š‹8 œ‹8íDŸ‹ §‹ ­‹ ¨‹8$©‹, ¯‹8
is_empty_bodyÁl°‹& ½‹8¸,¾‹8 Ћ8ü4Ó‹ Ù‹ ß‹ Ú‹8$Û‹, á‹8 is_all_bodyÁ\â‹& í‹8¸,î‹8 €Œ8TƒŒ Œ šŒ ŽŒ8$Œ$ “Œ8¹
,•Œ, œŒ8intersects_bodyÁ|Œ& ¬Œ8¸,­Œ8 ¿Œ8šDÂŒ ÊŒ ׌ ËŒ8$ÌŒ$ ÐŒ8¹
,Ҍ, ٌ8
contains_bodyÁlÚŒ& çŒ8¸,èŒ8 úŒ8¸4ýŒ ƒ  88$‰$ 8¹
,, 8 insert_bodyÁ\—& ¢8¸8 µ8Å ¾ Ï ¿8À8$ È8¹
, Ñ8 remove_bodyÁ& Ý8¸8 ð8Ò ù ŠŽ ú8û8$ÿ$ ƒŽ8¹
,…Ž, ŒŽ8 toggle_bodyÁ\Ž& ˜Ž8¸,™Ž8 «Ž8ß®Ž ±Ž ÉŽ ²Ž8³Ž8$·Ž$ »Ž8¹
,½Ž$ ÂŽ8»,ÄŽ, ËŽ8set_bodyÁDÌŽ& ÔŽ8¸,ÕŽ8 çŽ8õdêŽ öŽ 8$÷Ž$ ûŽ8¹
,ýŽ, 8intersection_bodyÁŒ…& 8¸,—8 ©8C ± ½8$ 8¹
,¸, ¿8
union_bodyÁ& Ê8¸8 Ý8Ž ê ö8$ ï8¹
, ø8difference_bodyÁ& ˆ8¸,‰8 8Ÿ¤ž ² ¾8$ ·8¹
, À8symmetric_difference_bodyÁÌÁ& Ú8¸8 í8º ú ÿ8, 8complement_bodyÁ|‚‘& ‘‘8¸,’‘*¨‘ «‘ žµ, µ‘ ¶‘ À‘+ ·‘ ¸‘ ¿‘, ¹‘8ÿî,º‘
Á‘8$Ë‘, Б8â™tÑ‘ à‘ ˜µ<ˇüî‘*+ ¥’ ¦’ ­’8Ý4§’8»’8,¿’8 Å’8á ,È’ Í’ Î’(Ð’8$Ó’, è’8þšTé’<³ˆü.+ ¼“ ½“ Ä“8Ý4¾“8Ò“8,Ö“8 Ü“8£ß“ â“ ã“(å“8$è“, ý“8Ö›Dþ“<äü””"<úÔ<œüÓ”C+ £• ¤• «•8Ý4¥•8¹•8,½•8 Õ8´$Æ• Ê• Ñ• Ë•, Ì•8$Í•(Ó•, Ö•8¥ ו, é•8¿œLê•<º‘ô<ú¬–<î‘ü¼–?+ ˆ— ‰— 8Ý4Š—8ž—8,¢—8 ¨—8Õ
L«— ´— ¾—, µ—8´$¶—& º—, ¼—8¥ ½—(À—, ×8,Ä—'É—8œLË—'Ô—8í$Ö—'Ú—8³
4Ü—'â—8¬4ä— ê—8$ë— ï—, ˜8¢t‚˜<ü’üž˜:+ å˜ æ˜ í˜8Ý4ç˜8û˜8,ÿ˜8 …™8å
”ˆ™ š™ ¤™, ›™8´$œ™&  ™, ¢™8¥ £™(¦™8$©™, ¾™8Šž¼¿™<ÿ“üä™&+ —š ˜š Ÿš8Ý4™š8­š8,±š8 ·š8þ
„ºš Êš Ôš, Ëš8´$Ìš& К, Òš8¥ Óš(Öš8$Ùš, îš8ûž¬ïš<ï”ü’›F<úå›<Ë•üõ›@<•–üœ!+ ðœ ñœ øœ8Ý4òœ88 Š8L  ¢, 8Ð $˜& œ ž8ÉŸ(¤, §8'­8œ'¸8í'¾8³
'Æ8¬ Î8 Ó, å8êŸ<& Whether all bits in `self` are unset.Áü‚ž)+ ¸ž ¹ž Àž8Ý4ºž8Ξ8,Òž8 Øž8íDÛž ãž êž äž, åž8$æž(ìž8º$ïž, „Ÿ8Ù l…Ÿ<ì ü Ÿ7+ äŸ åŸ ìŸ8Ý4æŸ8úŸ8,þŸ8 „ 8ü4‡    ”  Ž ,  8$ ( 8º$™ , ® 8Ç¡\¯ <ƒ¢üÈ ;+ ¡ ‘¡ ˜¡8Ý4’¡8¦¡8,ª¡8 °¡8T³¡ ½¡ Ò¡ ¾¡, ¿¡8$À¡$ Ä¡, Æ¡8¹
,Ç¡& Ì¡8$Ρ(Ô¡8º$ס, ì¡8Ç¢|í¡<°£üŠ¢;+ Ò¢ Ó¢ Ú¢8Ý4Ô¢8è¢8,ì¢8 ò¢8šDõ¢ ý¢ ’£ þ¢, ÿ¢8$€£$ „£, †£8¹
,‡£& Œ£8$Ž£(”£8º$—£, ¬£8Ë£l­£<ñ¥üÈ£;+ ¤ ‘¤ ˜¤8Ý4’¤8¦¤8 ª¤8¸4­¤ ³¤ ̤  ´¤8µ¤, ¹¤8$º¤$ ¾¤, À¤8¹
,Á¤& Ƥ8$Ȥ, Þ¤8ؤ\ߤ<™§üø¤E<úÊ¥<ô§üÚ¥W<Õ¨ü¾¦?+ Ч ‹§ ’§8Ý4Œ§8 §8 ¤§8Å4§§ ­§ Ƨ  ®§8¯§, ³§8$´§$ ¸§, º§8¹
,»§& À§8$§, ا8ã¥\Ù§<ªüò§E+ Ĩ Ũ ̨8Ý4ƨ8Ú¨8 Þ¨8Ò4á¨ ç¨ €©  è¨8é¨, í¨8$î¨$ ò¨, ô¨8¹
,õ¨& ú¨8$ü¨, ’©8î¦\“©<J Call `insert` when `value` is `true` or `remove` when `value` is `false`.Áü¬©M+ †ª ‡ª Žª8Ý4ˆª8œª8  ª8ߣª ¦ª ͪ §ª8¨ª, ¬ª8$­ª$ ±ª, ³ª8¹
,´ª& ¹ª8$»ª$ ¿ª, Áª8»,ª& Ǫ8º$ɪ, ߪ8¨Dàª<®üöª<+ ¿« À« Ç«8Ý4Á«+ Õ« Ö« ß«8Ç D׫8í«8,ñ«8 ÷«8õdú« †¬ š¬, ‡¬8$ˆ¬$ Œ¬, ެ8¹
,¬& ”¬8$–¬(œ¬8$Ÿ¬, ´¬8‚©Œµ¬<ñ¥üÔ¬;+ œ­ ­ ¤­8Ý4ž­+ ²­ ³­ ¼­8Ç D´­8Ê­8,έ8 Ô­8C,×­ Ü­ ð­, Ý­8$Þ­$ â­, ä­8¹
,å­& ê­8$ì­(ò­8$õ­, Š®8ÿ©T‹®<™§ü£®E<úõ®<ô§ü…¯W<½°üé¯C+ ¹° º° Á°8Ý4»°+ ϰ а Ù°8Ç DѰ8ç°8,ë°8 ñ°8ŽTô° þ° ’±, ÿ°8$€±$ „±, †±8¹
,‡±& Œ±8$ޱ(”±8$—±, ¬±8öª|­±<ªüʱE+ œ² ² ¤²8Ý4ž²+ ²² ³² ¼²8Ç D´²8ʲ8,β8 Ô²8Ÿ¤×² ë² ÿ², ì²8$í²$ ñ², ó²8¹
,ô²& ù²8$û²(³8$„³, ™³8ò«Ìš³<µ²üÁ³L+ š´ ›´ ¢´8Ý4œ´+ °´ ±´ º´8Ç D²´8È´8,Ì´8 Ò´8ºTÕ´ ß´ å´, à´8$á´(ç´8$ê´, ÿ´8ä¬|€µ% ŸµܹÃü¤µKH A macro that matches flags values, similar to Rust's `match` statement.Áðµúüôµc` In a regular `match` statement, the syntax `Flag::A | Flag::B` is interpreted as an or-pattern,Áüضol instead of the bitwise-or of `Flag::A` and `Flag::B`. This can be surprising when combined with flags typesÁüÈ·li because `Flag::A | Flag::B` won't match the pattern `Flag::A | Flag::B`. This macro is an alternative toÁüµ¸:7 `match` for flags values that doesn't have this issue.Áð¸údô¸ # SyntaxÁ¹úl…¹
```ignoreÁü“¹! bitflags_match!(expression, {Áäµ¹ pattern1 => result1,ÁäÒ¹ pattern2 => result2,ÁTï¹ ..Áäú¹ _ => default_result,Á4—º })Á<žº ```Á¦ºúüªº^[ The final `_ => default_result` arm is required, otherwise the macro will fail to compile.Á‰»út» # ExamplesÁœ»ú\ » ```rustÁü¬»-* use bitflags::{bitflags, bitflags_match};ÁÚ»ú|Þ» bitflags! {Áäî» #[derive(PartialEq)]ÁÔ‹¼ struct Flags: u8 {Á즼 const A = 1 << 0;Áìļ const B = 1 << 1;Áìâ¼ const C = 1 << 2;ÁL€½,н½úü”½$! let flags = Flags::A | Flags::B;Á¹½úü½½$! // Prints `the value is A and B`Áäâ½ bitflags_match!(flags, {Áüÿ½@= Flags::A | Flags::B => println!("the value is A and B"),ÁüÀ¾2/ _ => println!("the value is not A and B"),Á<ó¾ });Áû¾úüÿ¾" // Prints `the value is not A`Á䢿Þü¿¿/, Flags::A => println!("the value is A"),Áüï¿,) _ => println!("the value is not A"),Á<œÀ½ß<¤ÀŠÙ¬Àú”°À # How it worksÁÃÀúüÇÀhe The macro expands to a series of `if` statements, **checking equality** between the input expressionÁü°Áeb and each pattern. This allows for correct matching of bitflag combinations, which is not possibleÁü–ÂLI with a regular match expression due to the way bitflags are implemented.ÁãÂúüçÂA> Patterns are evaluated in the order they appear in the macro.Á(|©Ão¸ Õà íÅ Ûà †Ä, ÜÃ8 operationÁLÝÃ& æÃ8$çÃ$ ëà íà …Ä, ÷à øÃ þÃ, ùÃ8¿ úÃ& ûÃ8¯üÃ
ÿÃ*ˆÄ ‹Ä êÅ •Å âÅ–Å ™Å áÅ, §Å8,¨Å'­Å8˜„¯Å ¿Å ÀÅ ×Å, ÁÅ8“åLÂÅ$ ËÅ ÍÅ ÖÅ, ÏÅ ÐÅ ÓÅ, ÑÅ8¿ ÒÅ
ÔÅ ãÅ äÅ% ëÅìµÆüðÅ%" Expand the `bitflags_match` macroÁ(|–Æ4¬Æ€¸ ÓÆ žÎ Ç ÓÇ, ‘Ç8“åL’Ç& ›Ç8$œÇ$  Ç ¢Ç ÒÇ
, ¤Ç8patternÁ<¥Ç& ¬Ç8$­Ç*²Ç µÇ ÄÇ, ·Ç ¸Ç ÁÇ, ¹Ç8bodyÁ$ºÇ& ¾Ç8¯¿Ç
ÂÇ$ ÆÇ, ÈÇ ÉÇ ÏÇ, ÊÇ8¿ ËÇ& ÌÇ8¯ÍÇ ÐÇ*ÕÇ ØÇ ²È, âÇ8,ãÇ'èÇ8˜„êÇ úÇ ûÇ ¬È, üÇ8“åLýÇ$ †È ˆÈ «È, ŠÈ8Ëé<‹È*“È –È ¢È, ˜È ™È ŸÈ, šÈ8¨ê$›È
 È, ¤È ¥È ¨È, ¦È8¿ §È ©È% ³È çÈ ¨É, èÈ8“åLéÈ& òÈ8$óÈ$ ÷È ùÈ §É , ûÈ8Ëé<üÈ& ƒÉ8$„É*‰É ŒÉ ›É, ŽÉ É ˜É, É8¨ê$‘É& •É8¯–É
™É, É žÉ ¤É, ŸÉ8¿  É& ¡É8¯¢É ¥É*ªÉ ­É †Ë ·É €Ë
8ÅÉ, ÈÉ8“åLÉÉÓÉ, ÖÉ8Ëé<×É ßÉ ·Ê84ñÉ øÉ ¨Ê, ŽÊ Ê •Ê, Ê8¨ê$‘Ê
–Ê% ©Ê, ÆÊ8,ÇÊ'ÌÊ8˜„ÎÊ ÞÊ ßÊ öÊ, àÊ8“åLáÊ$ êÊ ìÊ õÊ, îÊ ïÊ òÊ, ðÊ8¿ ñÊ óÊ% ‡Ë ½Ë úË, ¾Ë8“åL¿Ë& ÈË8$ÉË$ ÍË ÏË ùË
, ÑË8Ëé<ÒË& ÙË8$ÚË*ßË, âË8¨ê$ãË& çË8$èË$ íË, ïË ðË öË, ñË8¿ òË& óË8¯ôË ÷Ë*üË ÿË ¬Í ‰Ì ¦Í
8—Ì, šÌ8“åL›Ì¥Ì, ¨Ì8Ëé<©Ì ±Ì ÝÌ84ÃÌ, ÊÌ8¨ê$ËÌ% ÏÌ, ìÌ8,íÌ'òÌ8˜„ôÌ „Í …Í œÍ, †Í8“åL‡Í$ Í ’Í ›Í, ”Í •Í ˜Í, –Í8¿ —Í ™Í% ­Í ÒÍ €Î, ÓÍ8“åLÔÍ& ÝÍ8$ÞÍ$ âÍ äÍ ÿÍ 8 æÍ*èÍ, ëÍ8><ìÍ& óÍ8$ôÍ, ùÍ úÍ üÍ$ ûÍ- ýÍ*‚Î …Î œÎ, Î8><ÎäÕÏü¡Î2/ Implement a flag, which may be a wildcard `_`.ÁÔÎúüØÎ]Z Named flags will emit the `named` block, and unnamed flags will emit the `unnamed` block.Á(|¶Ï4ÌÏ‘¸ òÏ ÈÒ øÏ ÷Ð ‚Ð ñÐ 8Ð $Ð& ”Ð8 –Ð$ —Ð8namedÁ,¥Ð& ªÐ ¬Ð ¼Ð, ®Ð ¯Ð ¹Ð, °Ð8‹û,±Ð& ¶Ð8¯·Ð
ºÐ$ ½Ð8unnamedÁ<ËÐ& ÒÐ ÔÐ æÐ, ÖÐ ×Ð ãÐ, ØÐ8ƒü<ÙÐ& àÐ8¯áÐ
äÐ$ çÐ*ùÐ üÐ —Ñ, †Ñ ‡Ñ Ñ, ˆÑ8ƒü<‰Ñ
‘Ñ% ˜Ñ žÑ §Ò ¨Ñ ¡Ò8Ð $¶Ñ& ºÑ, ¼Ñ8«$½Ñ& ÁÑ8¼,ÂÑ$ ÇÑ8‹û,ÕÑ& ÚÑ ÜÑ ìÑ, ÞÑ ßÑ éÑ, àÑ8‹û,áÑ& æÑ8¯çÑ
êÑ$ íÑ8ƒü<ûÑ& ‚Ò „Ò –Ò, †Ò ‡Ò “Ò, ˆÒ8ƒü<‰Ò& Ò8¯‘Ò
”Ò$ —Ò*©Ò ¬Ò ÅÒ, ¶Ò ·Ò ¾Ò, ¸Ò8‹û,¹Ò
¿Ò% ÆÒüžÜ'üØRO A macro that processes the input to `bitflags!` and shuffles attributes aroundÁüðØ63 based on whether or not they're "expression-safe".Á§Ùúü«Ù>; This macro is a token-tree muncher that works on 2 levels:ÁêÙúüîÙVS For each attribute, we explicitly match on its identifier, like `cfg` to determineÁüÅÚ;8 whether or not it should be considered expression-safe.ÁÛúü…ÛTQ If you find yourself with an attribute that should be considered expression-safeÁüÚÛ$! and isn't, it can be added here.Á(|ÿÛ4•Ü¢¸ ÆÜ §ê ÌÜ Ý, ÖÜ ×Ü ôÜ+ ØÜ ÙÜ óÜ, ÚÜ8ù,ÛÜ& àÜ8¼,áÜ, çÜ èÜ ñÜ, éÜ8À$êÜ& îÜ8¯ïÜ
òÜ
õÜ ÿÜ ‰Ý, Ý8° ‚Ý& ƒÝ8$„Ý*‘Ý ”Ý ×ß, žÝ8,ŸÝ'¤Ý8ÅÔ¦Ý ÀÝ ÂÝ Ñß8$ÐÝ& ÔÝ ÖÝ ÛÝ, ØÝ8° ÙÝ$ ÜÝ8attrsÁ,êÝ& ïÝ ñÝ Æß8 unprocessedÁ\°Þ& »Þ ½Þ ÕÞ,
attrs_restÁTöà& €á8¯á
„á$ “á8ÄŠL¡á& ªá ¬á ¹á, ­á ®á ·á, ¯á8$°á& ´á8¯µá
¸á$ ºá$ Åá*Íá Ðá •ä, Úá8,Ûá'àá8ÅÔâá üá þá ä8$Œâ& â ’â —â, ”â8° •â$ ˜â8éˆ,¦â& «â ­â „ä8‘‰\¿â& Êâ Ìâ ‚ã, ââ ãâ ïâ, äâ8»Tåâ
ðâ$ ƒã8ÄŠL•ã& žã  ã õã, ¶ã ·ã ½ã, ¸ã8$¹ã
¾ã+ Ôã Õã ãã8âÖã, Úã Ûã áã, Üã8À$Ýã
âã$ öã$ …ä% –ä ²ä æ8$¼ä& Àä Âä Ìä, Ää8° Åä& Æä8$Çä$ Íä8éˆ,×ä& Üä Þä ‰æ8‘‰\ìä& ÷ä ùä ×å+ ‹å Œå ¦å, å8¹
,Žå& “å8¼,”å, šå ›å ¤å, œå8À$å& ¡å8¯¢å
¥å, ¸å ¹å Èå, ºå8»T»å& Åå8¯Æå
Éå$ Øå8ÄŠLæå& ïå ñå þå, òå óå üå, ôå8$õå& ùå8¯úå
ýå$ ÿå$ Šæ*’æ •æ ¹è, Ÿæ8, æ'¥æ8ÅÔ§æ Áæ Ãæ ³è8$Ñæ& Õæ ׿ Üæ, Ùæ8° Úæ$ Ýæ8éˆ,ïæ& ôæ öæ ¨è8‘‰\ˆç& “ç •ç Ëç, «ç ¬ç ¸ç, ­ç8»T®ç
¹ç$ Ìç8ÄŠLÞç& çç éç ™è, ÿç €è †è, è8$‚è
‡è$ šè$ ©è% ºè Ðè èé8$Úè& Þè àè êè, âè8° ãè& äè8$åè$ ëè8éˆ,õè& úè üè áé8‘‰\Šé& •é —é ˜é$ ™é8ÄŠL§é& °é ²é Öé, ³é ´é Ôé+ µé ¶é Óé, ·é8$¸é& ¼é8¼,½é, Ãé Äé Ñé, Åé8exprargsÁDÆé& Îé8¯Ïé
Òé
Õé$ ×é$ âé*êé íé ¥ê, ÷é øé ê+ ùé úé Žê, ûé8$üé, ê ‚ê Œê, ƒê8šœD„ê
ê
ê šê Ÿê, œê8° êüöì'üªêRü€üýê0- based on whether or not they're "item-safe".Á®ëúü²ëVS This macro follows the same pattern as expr-safe above, but assumes all attributesÁü‰ìMJ are safe on items. It only filters out any `bitflags`-defined attributes.Á(|×ì4í쳸 ží ©û ¤í çí, ®í ¯í Ìí+ °í ±í Ëí, ²í8ù,³í& ¸í8¼,¹í, ¿í Àí Éí, Áí8À$Âí& Æí8¯Çí
Êí
Íí ×í áí, Ùí8´ Úí& Ûí8÷$Üí*éí ìí ©ð, öí8,÷í'üí8æÔþí ˜î šî £ð8÷$¨î& ¬î ®î ³î, °î8´ ±î$ ´î8éˆ,Âî& Çî Éî ˜ð8‘‰\ˆï& “ï •ï ­ï, –ï —ï «ï+ ˜ï ™ï ªï, šï8ù,›ï, ¡ï ¢ï ¨ï, £ï8À$¤ï
©ï
¬ï$ ®ï8ÄŠLýï& †ð ˆð ‰ð$ Šð$ ™ð% ªð Ëð ¥ò8÷$Õð& Ùð Ûð åð, Ýð8´ Þð& ßð8÷$àð$ æð8éˆ,ðð& õð ÷ð žò8‘‰\…ñ& ñ ’ñ ìñ+ ¤ñ ¥ñ »ñ8ÞD¦ñ, ¯ñ °ñ ¹ñ, ±ñ8À$²ñ& ¶ñ8¯·ñ
ºñ, Íñ Îñ Ýñ, Ïñ8»TÐñ& Úñ8¯Ûñ
Þñ$ íñ8ÄŠLûñ& „ò †ò “ò, ‡ò ˆò ‘ò, ‰ò8÷$Šò& Žò8¯ò
’ò$ ”ò$ Ÿò*§ò ªò Êô, ´ò8,µò'ºò8æÔ¼ò Öò Øò Äô8÷$æò& êò ìò ñò, îò8´ ïò$ òò8éˆ,€ó& …ó ‡ó ¹ô8‘‰\™ó& ¤ó ¦ó Üó, ¼ó ½ó Éó, ¾ó8»T¿ó
Êó$ Ýó8ÄŠLïó& øó úó ªô, ô ‘ô —ô, ’ô8÷$“ô
˜ô$ «ô$ ºô% Ëô éô îö8÷$óô& ÷ô ùô ƒõ, ûô8´ üô& ýô8÷$þô$ „õ8éˆ,Žõ& “õ •õ çö8‘‰\£õ& ®õ °õ µö+ éõ êõ „ö, ëõ8¹
,ìõ& ñõ8¼,òõ, øõ ùõ ‚ö, úõ8À$ûõ& ÿõ8¯€ö
ƒö, –ö —ö ¦ö, ˜ö8»T™ö& £ö8¯¤ö
§ö$ ¶ö8ÄŠLÄö& Íö Ïö Üö, Ðö Ñö Úö, Òö8÷$Óö& ×ö8¯Øö
Ûö$ Ýö$ èö*ðö óö ¿ù, ýö8,þö'ƒ÷8æÔ…÷ Ÿ÷ ¡÷ ¹ù8÷$¯÷& ³÷ µ÷ º÷, ·÷8´ ¸÷$ »÷8éˆ,Í÷& Ò÷ Ô÷ ®ù8‘‰\æ÷& ñ÷ ó÷ ©ø, ‰ø Šø –ø, ‹ø8»TŒø
—ø$ ªø8ÄŠL¼ø& Åø Çø Ÿù, Ýø Þø äø, ßø8÷$àø
åø+ ûø üø ù, ýø8¹
,þø, „ù …ù ‹ù, †ù8À$‡ù
Œù$  ù$ ¯ù% Àù Öù îú8÷$àù& äù æù ðù, èù8´ éù& êù8÷$ëù$ ñù8éˆ,ûù& €ú ‚ú çú8‘‰\ú& ›ú ú žú$ Ÿú8ÄŠL­ú& ¶ú ¸ú Üú, ¹ú ºú Úú+ »ú ¼ú Ùú, ½ú8÷$¾ú& Âú8¼,Ãú, Éú Êú ×ú, Ëú8itemargsÁDÌú& Ôú8¯Õú
Øú
Ûú$ Ýú$ èú*ðú óú §û, ýú þú •û+ ÿú €û ”û, û8÷$‚û, ‡û ˆû ’û, ‰û8ý¶DŠû
“û
–û,  û8´ ¡ûü÷û!ü¬û+( Determine the name to assign to a flag.Á(|Øû4îûĸ ™ü Α ®ü þü, ¸ü ¹ü Öü+ ºü »ü Õü, ¼ü8ù,½ü& Âü8¼,Ãü, Éü Êü Óü, Ëü8À$Ìü& Ðü8¯Ñü
Ôü
×ü áü øü, ãü8Æäü& çü8Æèü8,ìü8 òü ôü8 öü*€ý ƒý Šý% ‹ý ‘ý ÷ý, ›ý œý ¹ý+ ý žý ¸ý, Ÿý8ù, ý& ¥ý8¼,¦ý, ¬ý ­ý ¶ý, ®ý8À$¯ý& ³ý8¯´ý
·ý
ºý Äý ñý, Æý8ÆÇý& Êý8ÆËý8,Ïý, Õý8bindingÁ<Öý& Ýý8¼,Þý äý, æý8Ð $çý& ëý8$ìý*ùý üý ù€, †þ8,‡þ'Œþ8¤Žþ ¢þ ¤þ ó€8÷$²þ& ¶þ ¸þ ûþ, ºþ8Æ»þ8,¿þ, Åþ8¾<Æþ Îþ, Ðþ8,Ñþ'Öþ8œLØþ'áþ8í$ãþ'çþ8ÔLéþ òþ óþ ùþ, ôþ8Ð $õþ$ üþ8éˆ,Šÿ& ÿ ‘ÿ è€8‘‰\Ðÿ& Ûÿ Ýÿ õÿ, Þÿ ßÿ óÿ+ àÿ áÿ òÿ, âÿ8ù,ãÿ, éÿ êÿ ðÿ, ëÿ8À$ìÿ
ñÿ
ôÿ$ öÿ8ÄŠLÍ€& Ö€ Ø€ Ù€$ Ú€$ é€% ú€ « ¸ƒ8÷& ¹ » è, ½8ƾ& Á8ÆÂ8, Ì8¾& Ô8¼ Û, Ý8Ð & â8$ é8éˆ& ø ú ±ƒ8‘‰\ˆ‚& “‚ •‚ ÿ‚+ §‚ ¨‚ ΂8ÞD©‚ ±‚ Í‚8 flag_nameÁL²‚ ¼‚, ¾‚8åÅL¿‚& È‚8$É‚, à‚ á‚ ð‚, â‚8»Tã‚& í‚8¯î‚
ñ‚$ €ƒ8ÄŠLŽƒ& —ƒ ™ƒ ¦ƒ, šƒ ›ƒ ¤ƒ, œƒ8÷$ƒ& ¡ƒ8¯¢ƒ
¥ƒ$ §ƒ$ ²ƒ*ºƒ ½ƒ õ…, ǃ8,ȃ'̓8¤Ïƒ ãƒ åƒ ï…8÷$óƒ& ÷ƒ ùƒ œ„, ûƒ8Æüƒ8,€„, †„8¾<‡„ , ‘„8åÅL’„$ 8éˆ,«„& °„ ²„ ä…8‘‰\Ä„& Ï„ Ñ„ ‡…, ç„ è„ ô„, é„8»Tê„
õ„$ ˆ…8ÄŠLš…& £… ¥… Õ…, »… ¼… Â…, ½…8÷$¾…
Ã…$ Ö…$ å…% ö… ”† Œˆ8÷$ž†& ¢† ¤† ц, ¦†8Ƨ†& ª†8Æ«†8,¯†, µ†8¾<¶†& ½†8¼,¾† Ć, Ɔ8Ð $dž& ˆ8$̆$ Ò†8éˆ,܆& ᆠㆠ…ˆ8‘‰\ñ†& ü† þ† Ó‡+  ‘‡ ¢‡8â’‡, –‡ —‡  ‡, ˜‡8À$™‡& 8¯ž‡
¡‡, ´‡ µ‡ ć, ¶‡8»T·‡& Á‡8¯‡
Ň$ Ô‡8ÄŠLâ‡& ë‡ í‡ ú‡, î‡ ï‡ ø‡, ð‡8÷$ñ‡& õ‡8¯ö‡
ù‡$ û‡$ †ˆ*Žˆ ‘ˆ éŠ, ›ˆ8,œˆ'¡ˆ8¤£ˆ ·ˆ ¹ˆ ãŠ8÷$Lj& ˈ ͈ ëˆ, ψ8ÆЈ8,Ôˆ, Úˆ8¾<Ûˆ ãˆ, åˆ8Ð $æˆ$ ìˆ8éˆ,úˆ& ÿˆ  ØŠ8‘‰\“‰& ž‰  ‰ Ö‰, ¶‰ ·‰ É, ¸‰8»T¹‰
ĉ$ ׉8ÄŠLé‰& ò‰ ô‰ ÉŠ, ŠŠ ‹Š ‘Š, ŒŠ8÷$Š
’Š+ ¨Š ©Š ·Š8⪊, ®Š ¯Š µŠ
,…Œ& ŠŒ8¼,‹Œ, ‘Œ ’Œ ›Œ, “Œ8À$”Œ& ˜Œ8¯™Œ
œŒ, ¯Œ °Œ ¿Œ, ±Œ8»T²Œ& ¼Œ8¯½Œ
ÀŒ$ ÏŒ8ÄŠLÝŒ& æŒ èŒ õŒ, éŒ êŒ óŒ, ëŒ8÷$ìŒ& ðŒ8¯ñŒ
ôŒ$ öŒ$ * Œ , 8,—'œ8¤ž ² ´ 8÷& Æ È æ, Ê8ÆË8, Õ8¾ Þ, à8Ð $ ç8éˆ& ú ü ˆ8‘‰\ŽŽ& ™Ž ›Ž ÑŽ, ±Ž ²Ž ¾Ž, ³Ž8»T´Ž