Files
archy/core/target/debug/deps/libbitflags-9cd5f943559525c4.rmeta
T

1247 lines
195 KiB
Plaintext
Raw Normal View History

rust
#rustc 1.93.0 (254b59607 2026-01-19)Áõ…·fÊ ¦%g--c48c539199cbc88bÁ³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áá\ƒ¦è3$|]åŒ[IÚ tæ-14b12edc9f8cd90bÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áà 9m Ù„«ÐÒþá•cB;-030c5b0bba47cc8fÁrustc_std_workspace_coreÁÛ¹þÓ7>H%¸ÚÉ­-4b81d37a5530864dÁüÃùs<Uß7VyóHr#QÏ-c66cc7807550ce25Á miniz_oxideÁõFÖˆÚ™ª‹"ÞXzLVª-62cbc7af83058505Áadler2Á—wÉD‘嵯|6¨%Œ
+-2f171dd2394b4b62Á hashbrownÁ,ïcV¼¨ø¢:Ê\'È߈-9571ba9e0f6c7a90Árustc_std_workspace_allocÁ%¥Èxµù·¼5Ä3Bœ-aac566ad65903fa4Á
std_detectÁMmáýZ^9õ Îà§e˜÷e-2edb296e590136d8Árustc_demangleÁ@¼§VÉNb˜æ¨fHÌ+V3-53b132e4a2fa6e26Ácfg_ifÁfÝv.Å"ÒÜuPp¹ˆ¶-f76b385d7d4d7f3eÁ addr2lineÁÕú-WiúQVÓ¬
µT§5-fe25100bd73e48e4ÁgimliÁ¹xLáÇí÷‘o±Ñ8£Å-265ba9e6e4f70b3fÁobjectÁÔ³ÝzÓÿ¶ò°öM›¼òü`-9ae0d1f8ea52a318ÁmemchrÁRÎ÷׎™te~QÓ¿ØC\Ò-0bff3c8e8f4e489eÁ  –©HtGNÏ·ˆ!á-d69228d077d46f36Á5 AsDisplayÁL©serdeÁ<Œƒ¼Þ,ތ߼ arbitraryÁL쟼bytemuckÁDü¹¤Ù»Þ<Þ<—Œ»__impl_external_bitflags_serdeÁôÃÞŒ¢»Lû&<Û&\å&¬Û&»¹D¨'<'¹T—'¤'»"__impl_external_bitflags_arbitraryÁü·("<(\œ(¬’(»!__impl_external_bitflags_bytemuckÁüü0!<Ø0¹Tâ0¤Ø0example_generatedÁŒäå<¼åü
œÆåì¼åtestsÁ,‰æà$þå£ IterÁ  innerÁ doneÁ   __private_const_newÁ ½¥  IterNamesÁ ÂidxÁsourceÁ remainingÁ  " "Å "­
& &½&¥ IterDefinedNamesÁ* *Â*
. . 1 1½1¥ parserÁ5555555 to_writerÁ< <
impl WriteÁ5÷? ? ? 5to_writer_truncateÁC C5from_str_truncateÁF 5to_writer_strictÁH H5from_str_strictÁK K 5WriteHexÁN write_hexÁO5ParseHexÁQ parse_hexÁ5Sinvalid_hex_flagÁTimpl fmt::DisplayÁSinvalid_named_flagÁV¨S
empty_flagÁ5YÍ5traitsÁ\\\\\\\\\\ \
\ \ \j j jÿ
j˜jis_namedÁj
is_unnamedÁ\FlagsÁqFLAGSÁqBitsÁqemptyÁqàqcontains_unknown_bitsÁqbitsÁq from_bitsÁqfrom_bits_truncateÁqfrom_bits_retainÁq from_nameÁq£ q
iter_namesÁqiter_defined_namesÁqis_emptyÁqis_allÁq
intersectsÁqcontainsÁqtruncateÁqinsertÁqremoveÁqtoggleÁqsetÁqclearÁq intersectionÁqCq
differenceÁqsymmetric_differenceÁq
complementÁ\ŽEMPTYÁŽALLÁ\ PrimitiveÁ\ impl_bitsÁ\ PublicFlagsÁÜInternalÁ\BitFlagsÁþ ø \ þ ø \ \ImplementedByBitFlagsMacroÁ\ __privateÁ   Ž¤¤¤¤bitflagsÁ__impl_bitflagsÁbitflags_matchÁ__bitflags_matchÁ__bitflags_expr_safe_attrsÁ__bitflags_flagÁ
±__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Á»ÿ»ú »¼
5
ParseErrorÁÁ
Áì5ÄÍ5ParseErrorKindÁÆ EmptyFlagÁÇ
ÆInvalidNamedFlagÁÉgotÁÆInvalidHexFlagÁË­5ÍÍ\FlagÁÏ Ïÿ
Ϙ\Ó ÓÍ\ÖÅÖÒ\ÙÅÙÒ\ÜýÝ \ßýà \âÖãæ\ åÖææ\
\ \ êÅêÒ\
íÅíÒ\ðýñ \óýô \öÖ÷æ\ùÖúæ\\\þÅþÒ\ÅÒ\ý \ýˆ \ŠÖæ\ÖŽæ\\\ÅÒ\ÅÒ\˜ý \ýœ \ žÖŸæ\!¡Ö¢æ\"\#\$¦Å¦Ò\%©Å©Ò\&¬ý­ \'¯ý° \(²Ö³æ\)µÖæ\*\+\,ºÅºÒ\-½Å½Ò\.ÀýÁ \/ÃýÄ \0ÆÖÇæ\1ÉÖÊæ\2\3

!
%
)
4
<
?
C
F
H
K
O
R
Z
Z
Z
m
n
o
p
v
w
{
|
}




ƒ




ˆ
Å
Å
Å
Î
Î
Î
Õ
Õ
Õ
Ý
à
ã
æ
ñ
ô
÷
ú

ˆ

Ž

œ
Ÿ
¢
­
°
³

Á
Ä
Ç
Ê
NQqŽŸÞK  þ 
  á☚8(„ ÞKø Â
 
­
ÓûÜÌò‰ó'ÞK**,Â-
²ãf³°gBó'à`ÁÁ¿Ãì5 ¸F´Và`ÆÇÈÿÉÊ­5˸̭5ÄT}j]Ý7Úå`Ž)ÏŽ)à`ÏÏáÑÿ
\Ò˜\D9-DV@šó'ŽŽQô*Qþ*Nô*Nþ*þ*ô*ŽŽQÀ+QÊ+NÀ+NÊ+Ê+À+ŽŽQŒ,Q,NŒ,N–,–,Œ,ŽŽQØ,Qâ,NØ,Nâ,â,Ø,ŽŽQ¤-Q®-N¤-N®-®-¤-ŽŽQð-Qú-Nð-Nú-ú-ð-ó'Ÿó' &1ÁÍÆÓÏYÁ[ÁÖÙêíþ¦©º½Üßð󘬯ÀÃâåöùŠž¡²µÆÉèéüý¤¥¸¹ÌÍÞK¦à`å`ÏŽ Q <N < <<Ÿ¬Ç
!ó'$ü­S
 ó'üþˆÀ' ó',€(Â8µ1Ÿüá8ôá
$ó',€4‡L3üÇv
 ó',­ÃüàãÀ'$¸ 
³*,ó'ó'€(¤Â% 
)­
-eâ2ÛåÐÖÚàäê
&$â2O ˜1
 ó'/ ¼60>À';Ô36ó'5ó'4€(×Ô3Äó'Åó'ÆÂq 
v­
{´€(Œ¾
àK€(0( ¼¸HL ó'ó'
ø°ó' ú 
ø°ó'„±
 €(´·


%ó' .
ü·
!

ó'C
*
 
ø°ó'ü³
¤ˆ  €(ó'܈ $ 
wó' 2  4 üô
0ϙ

zó' C
 "üï
6
ø°ó'
¡    


ü…œìÞø°ú°û°Ðü°ý°þ°ìHˈXêE>ó'”› À'Lø°ú°û°Ðü°ý°þ°ìHˈXêE>š8ø €(ú-ó'¥Íõ™2& €(Fó'ró's©™2Êú-<ºflagÁ;¥7©9Ó9hÇ:ùñ:Ö$­Ç:ü“!œ“ñ:;Ç:üÊ!œÊñ:<ü¿·
ó'ró'Ô3 ùð-ü õüì!€(™2ó'ùÙ=&ó'¾Ù=ìÂ)X¤ró'Ô3Ç:_ñ:?Ç:"ñ:ó'˜üÀg
ó' ðð-­$üÙÔ€(Ô3ó'4•ó'L Â 
"­
&Z
Lÿ4–å
ó'âð- ¦ô$ò€(îÔ3ìó'êó'èÔ3±ó'¥ó' 
­
#Xó'ˆ%üË=™2æÆ= ,ü’® Ô3ð-Ä©´
ÿp³*ð-C6l´0  ³*t†ó'̆D•Ó9)T•$
ø°š8ð- æð-) ð-,ð-Tð-ð-\$ 
mó'$
´›
±y
B  ' 

nó'  œô$Ç: ?  4\™ó'Ì®œ®ñ: 
ü™/
ó'TD
ü¥#1
ó'Ìöœöñ: üÜ4
ó'TDüë%1ó'ÌÅœÅñ: ü¯0
ó'UDü¾!\ÿ$„ ÊH$ÿ4„ ÌŒ œŒ ñ: üþ(
üù.
ø°š8ò
ø°š8Ô  üßõ )üÂþüé×È<”õ”=ø°ú°û°Ðü°ý°þ°ìHˈXêE>æFtð-ú-HæF>™23ð-ØJœ8}Ù=™2,­™2îó'áL™2ó'ë ó'0ó'"š8œ8Ýó'¿Ô3‡=ùÓ m’FeÓ9îÊH9õH¬IãÇ:¾ñ:³Joñ:!«Kñ:´¤LÊHkñ:Kü¾#M
*ó'Dä#ró'Ô3 ÿ#ð-$0ü˜#yÑ($¯#Pró'Ô3ü¢%T¹%
Ô3DÈ%ð-Ĺ%Ä%’F
:-lÄ%' T¬%
$±%æFlà%ð- ì%ð-) ð-,ð-Tð-ð-|¥&Dª&
oó'$¥&Tª&+\Ô&$Ù&ÊH$Ô& 4Ù&dõ&,ú&¬I$õ& <ú&œõ&$'Ç: :  4'üá&(œá&ñ: 9

üÓ&7
 
üÎ&=
ø°š8¸' $®'
ø°š8" +üï$É4üÒ%ÒÈ<”…% Ñ(L÷$±N0ð-Lú-
æF¤Oôš8Íœ8eó'ýÙ=(™2VÔ3^g‡=V¯’F­ÈTíÊH¸¬I˜Ç:xñ:Z4-
-
”õ 
}ó'.
H,ž

±J”=*)"&ø,
Ÿ? NS
àK”= d)mq
}
$
 š8œ8
    )


œ8¼Ê


Œ`B8 („Ñ
À-Ê

¡"ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ýOѼѼÒ¼ štÀ.Â

(˜œ
¨ º

¤"Ž\ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶äߌi•Î/Wfìß\g Ë]/(I
,ÿ
 ´Ž L• Ö[% 
(|• ¸/Ž ˆ\?(  ,H)O
 Â]0 Ë]0(q$ „‘ L– ©9$)\– ¼‘  Ç:9) 


Ù=Ù=
ܱ

¡Ù=Ù=QH))/
"


,€
!
œ8¼ï
 Ö[ 9!/)„ö À1ï
ˆ\=)
" ,
">2†
Â]Ë
Ë]1)`
%$­
&
œ8´œ

Ö[%9&/$)
¸
ˆ\$=#)
' #,
'
*
-

+ܽ


OÙ=Ü[*K+B))ŒÇ

Â]ÝË]2)¿à5½
ˆ\)m( )
, (,
,"!>
Â]CË]3)`œæ
ê³ýOß\sýO ú
#.-'+Ú%)3&.C-',û
)n.ü–åŠ''¨*¸-*-$
$Þ%5%z%<üÌ ¯üæ •mü¨
¹ÀÄÊ
Ÿ¦ ¼Ž  ü ú*
1Äï 
4
;¼œ

ê
ñä½

.Ž\´×™2Ü[Þ€(”=x”=”=ˆÈ< ”=ú-pœ8â—å—æ—}ç—ìè—é—iê—ìºÀe?=c&Ë]ýOÐŽ\  Ü[;œ84ú-4ùjZŽ\ŽØk§ú-Ù=L… ™2þÆ= Ù=гlÊÙ=ÒtùjŽ\BØkoœ8hú-íùjŽ\·Økäœ8Ýú-ùjèŽ\J³lÜ[{ú-ÅÂÂwriterÁÍfirstÁ
£ Ü£ W
ÿ
Í  Ú
wkË]Â}ýOÚ
e Ë]Ê ¡ýO­
c
Ú
ú¿Ë]ÔÑýOÚ
 ãË]ÜõýOÚ
ÊË]äýO&|Ù=Ù=•Y ÏYL šZR È<ˆ
Ö[X
ˆ\+
Â]1
Ö[ˆ\œÈ<¬
Â]¨©9)Ç:
«a·Ö[>ˆ\Â] Ö[ˆ\yôdÂ]ˆ\ÆÂ]Ì€(HÈ< €(TÈ< €(`Ü[fÜ[lÜ[r*„›(
(

tó'0d$‡
ƒz,"4‡¼õH>"%d­(
„ª
ê³ó'Ž)á%„Ó
ãyß|"€7Ó
±JºÄºÄ»ÄSplitÁ¾Äìs Lù‚mœRd\"]aø7Ççz
Ž
àK‡t
Ÿ  "¨¬ ¸ 
ò œ8 r 

"(
'„´
ê³ó'Ž)' Å(
Æ!õH
"'Äø´ø
X"ìô
ê³ó'Ž)%¼Ä
zœ8
œ8 "”É9 
œ8Ô…¤…
RÙ="%ü¨&
Aó',Ž)Ž) œ8ü…J< 
¸YÙ=Ž)Ž)Aó',˜y¥ys"ü /ø8…K 
¡"ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶Ù=Ž)´"tx 
ü…K}Ù=Ìßœßñ:&"iê³í³î³Òï³ìð³ñ³ò³ìäs{©¶™^Ž): p
¤"ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ó'Ž)à{Õ'"®”«
{ó'
$¸"$üÉ' 

Bó',ýOŽ)¥y ü«F
ªRó'Ž)Bó',ú}¥yŒi"ü¾3ø:«G 
¡"Ç|`"#'! 3!
ü«G#}ó'#ü°Ì"ià{
Á|")("¤d‡%\&ü‡ 4”
ó'%9&/$)"œ”
(
!3#ü´ P `( $¾ %p
%´?Yü—¯üäÊüîÀüžüܦüê˜X_¢©
z ·¾)Ç|¬Þœ8ó'¬?œ8qó'‡tŸ‡tä‡t¯ø°ú°û°Ðü°ý°þ°ìHˈXêE>œ8û ‡tú- œ8Eœ8ºŽ)ó'¨ƒVú-œ8â—å—æ—}ç—ìè—é—iê—ìºÀe?=c&à{Ù=Ÿzðz]Ñy<§yDú-÷à{ÿÙ=Câ—å—æ—}ç—ìè—é—iê—ìºÀe?=c&à{ó'ÖÇ|$ï;©~i§yqú-Œà{ó'ËýOP…Pvó'oó'J inputÁ. parsed_flagsÁë
£ Ë ‡=  ‡=Å
parsed_flagÁć=ÅÓÚ
G
Ú
e " #½þqn  r> õH Ås¥
tn
‡ut
 r õH ¥wãìw¢Ýx8ÂyÙŠzñ:ïÁ|¢¿}ó~œâ~\Á|b©€£ó'ó'Š §yü¬"ä¬
Tœ8:$ ÍÎÒAàŽ)«ÑyõŽ) ©œ8¨§y
‡=Z §y& „Š´Ž)Ž)
_ref__flagÁ§yüÌ$ôÌ
Vœ8:#ðBHŽ)Ë©~]œ8t§yl‡=>§yù‹»Š ü‘$ Ç:ü’#¬’
yó'A#w
ü‡7L‡
<ó'Ü[ÁC+ ¿Àü‡¹8HC1Ž\´Í™2Ü[™2Xó'Ù=?Ü[í¡Â:æl>Ç:w×W«Ž
ó'ßó'äÜ[é ¤Ù
?ó'#¨<Ùâ~< +=¬Ù
}ó'
!äÙÇ:C  ià{®Á| )ÆüÃ3¬Ã×p üÀ7
ê³ó'Ž) øù
üÔ¥F»Á  Ç|¬‡œ8ó'Ù=™2Nó'VØ…¢Ç|Óú-à{%ó'’†UÚ
F ¤
Ñ#â~Ç:Á| ×Gó'
ó'$³!
”Ì!TÒ!•Y,Ì!dÒ!Lõ!H>õ!ÏY$ ø>ä!Ÿ9 HMšZ Xae
q
L#$é! š8œ8,"   >#4¡",²"
œ8¼¡"L¨"Ö[9/ „¨"À?¡"ˆ\=

 
, >@¸"Â]L#Ë]`lÎ",Ö"4å"´å"Lì"Ö[% $ö"
|ì"¸Aå"ˆ\?  ,UO
Bû"Â]L#Ë]qœ‰#
ê³ýOß\L#ýO #Ó2Bž#
l|üËÓê=
H
%ü£!ûü½!áüÿ!„êñÄ¡">E ¼å" Ž\´“ ™2Ü[L§!€(DÁ!”=»”=Ô”=ËÈ<Ó×jÛú-œ8aMùjÖŽ\Øk5œ8.ú-³ùjGŽ\{Økú- 
­æl±úl£ ¸£ uÿ
÷ Ú
&L#Ë]@L#ýOÚ
 L#Ë]H L#ýOЕYÏYâšZèÈ<*Ö[úˆ\ÖÂ]ÜÖ[Wˆ\1È<NÂ]=€(¨Ü[®È<f€(ºÜ[ÀÈ<x€(ÌÜ[Ò%„„&
 T—&
D—&þq+dê&$ð& r,ê&4ð&¼ê&D÷&õH;T÷&%d'
„“'
ê³ó'Ž)L#"„¼',Â'Ås,¼'È'|TÂ'€C¼'tK øC°'ã9
HM‡u
X  ae q 
L#$´' œ8\â'$ç' r $â'

4ç'dœ,
„™,
ê³ó'Ž) ª,
«,|¸(D½(õH
$¸(T½('Äá(´á(¥wìÝ(
ê³ó'Ž)L#"´ˆ*\*
×yœ8
$ˆ*$™*œ8 Œ*;ü¸*:ä¸*„ŠäÕ*œ8 )ü´*?
ê³ó'Ž)L#"”š+dš+¿}
$§+ü¸+'

Mó',ú}¥yüš+FT­+
ªRó'Ž)Mó',ú}¥yaü­+3øDš+G â~Z! -
üš+G}ó' ) dì+\€, 
üì+ 4ù+©€F<$œù+Eà+ià{äÁ|)ý , 
L#" &ß9 üÁ$êVf!¡± #K
Rü€&«üÍ'Æü×'¼üˆ+07ÌÓ!Ç|¬ò$œ8,â$ó'9œ8ñó'Ÿ‡t'‡tg‡t7¨ƒ@ôƒIú-$œ8Ïœ8$Û'DŽ)׎)ó'\Œ+Ø…¹Ç|ï;_–¨E§yMú-à{ó'µýOY…Pó'Šó'#î’†¥†E£  ‡=¢ ‡=×
ᆼÚ
«Eþqy rNõH-Ås¸t‡uŒ rïõHs¥wB—¦„ŠÀ¿}oЍ&â~æ©€LÁ|óó'Îó'Ôó'$Ú+§yü»+$ô»+ù‹6ß+M׎)º+–¨íœ8q§yü‡= §yù‹}»Š(ˆ0 
œ8p¦0Å)  à`QV
¨agl\y0ÅŽ\ Ž)¥ Á`Á`œÃ`è Á]Ä`bufÁÁ]Ê­\É:•êœ8ñ¿²ä  Å)ñü³ùþ%0ú³¿²)Ù²E(Á0 $X3
¸ÉHÉHÊHœÜ3ËÚ¢×€JÜn vœ8V ^œ8h
t
¿²±
šaÇ Ì §
¬ÞXˆ2µýœ8.6œ8@ L ¿²AGжU[ns| œ8
‹a¡§°Æ0ÎÈÎÕŽ\âü³ë¦³ôú-üœ8 µ.œ8œ8>¿²G ׸S׸œ8Fœ8$¿²-ü¸6jþx__self_0Á¬Ò¸q
¤ü¸¿²ˆж¹ü¸¿²áжÊä·Ñ$¸4,•5Œ•5L5
Ø5¨-\5üÔ5&
ÆüÉ52
Á €66üé3˜Tü¬4ÕüÇ4ºŽ)$4ܺ$4ܺ,°4µË4 ܺòÅ)½‡=2_flagÁ:­;Öº"ܺÍܺÓ$¯7,Œ8ŒŒ8L’8Öº%\8üË8(
ÆüÀ84
Á ù8ú8üÞ6œVü£7×ü¾7¼Ž)$”7ܺ$ø6ܺ,§7µÂ7£¼çÅ)º‡=/Æ»3­4ŠÖºܺÆܺÌÌô9
Æüé9%
Á :”:Xü½9WŽ)$Ú9Å)`(Í œ8î  œ8œ8&¿²@ 
œ8
ó'& 
2 ¿²
œa§¬œ¡otÈÒÕß Ž\êæFñ¦³ùœ8œ8ó¿²û§yœ8Ó¿²Û ™2å™2ìAþOZ§y¿²R鿲%ÚÁx¤Ø
Ïó'òlü—[³*œ8ó'ÿ
˜C¤
Ïó' ë°l®³*«œ8©ó'§œ8}ó'qÿ
ȘÌöLœ8¬müêBœ8d†æF ,]œ8[mYœ8VæFT]~\ó'¢nüç;™2æF ,^dó'u ¡wnu™2ræFp™2²¡œ8¤ÝõH(¬Ü÷oü­JæF_œ88õHŒ¦¬œ8¼µ
¼ºõHภð¾ÂoÀ½æF»œ84œ8ÑÚúœ8¤¶ õH(Ð pü… KæF, œ8 2õHnŒœ8¢
¢ õHÆž É ¤p¢ŸæFœ8œ8¬µÕüå)´å
zŒüÎsŸÎ;tüÈLÎRŸÎŸÎˆÎƒ Œü
ŸÎŸÎ
rÎ 
ÏÏáÑÿ
\Ò˜\‚D9-DV@šÎ”¤
–q¼Ïr
±JÙiÙiþ Üi÷ ®iÝi
end_or_lenÁ®iÞi_markerÁ®it¸N(¼Ïz~øZ˜c¥ª
àK¸Ð¼ÄÈ Ôæ  ¼Ï 
nÎ 
ü…!´…ˆÎ% œÝ
wÎ
w  üÑ
æïŸÎŸÎ µ N

,üÅ+
R¬uüÍßüèÄ~ü·DΟθÐ4¸Ðh¹ÏȸÐOø°ú°û°Ðü°ý°þ°ìHˈXêE>¥Òœ ¸Ð¨ú-%¥ÒÍŸÎ%ŸÎÄŸÎa ÎʟΩ truncatedÁÓ£ ‡=( 'ÀŸÎŸÎrιψÐu²ÐQÔÑXÉÒIˆÎ¦ÓúÏÓ×

uÎ!”¨¦ÓD¦Óü¨ 
ÆîŸÎŸÎmL-1¦Ó & ü¨/
¡ŸÎŸÎW, ÜÝ üögv
$™þÕ, ŸÎŸÎ
ŸÎaþÕ΢ŸÎVžÚøŸÎUƒµ×Ú¦Ó²¦Ó±Ør¦Ó:¤Ù
ÎâÎè 

ôµ

ĵ
yÎ;6„á¦Ó%$Äá
 ŸÎŸÎ]2+1L

 |ˆ
ø°Î üÞe
ø°Î$ È


É. üìÝJx ü¥¤ ø°ú°û°Ðü°ý°þ°ìHˈXêE>ΟÎΟΞÚÍŸÎÖþÕïžÚ¸ÎrÓY—Õ|ôÿÛn¦Ó+óÜòÎQÎXµ×”æ¦Ó?Ìß±Ø@#üÈ1´ÈˆÎ? þÿüŽqyΟΟΩŸÎ×þÕ ÎÓ.^µ×1¦Ó±ØïˆÎÌέγ|Š!D!õH$Š!T!&$¯!
ø°ÎL#X[Ô!
±J¹Ï\Ô!rιÏ15ø[È! N]bÔÑnvz  ˜$Ì!¥Ò\ñ!$ö!
mÎ$ñ! 
4ö!$ò"
ø°Îü"M
 $€" œñ!
 œ8œ8
 0  (.  dº",¿"ÉÒ$º"
<¿"œº"$Ç"¦Ó<4Ç"ü£"+´£"ˆÎ;
üž"1
ø°Î
L#ù{ü¢ ÚÉüà!ˆÿÞœ8Œ¸Ð=¸ÐFùÔOÆÕXú-¥ÒËO§yÀœ8ȧywÎæŸÎþÕCÿ
£ º‡=(Í»rιÏõH@¸äïÔÑöñåEØæãÉÒ¬¦ÓŒˆÎn¬ú$|ú$
Î$Š%%•%|üÍ$H  þ 
  á☚8(„΄ß$þÕ,Õ$ aáê¥ÔÌ'¤Ì'
!Î$á'%ì'}ü”'Xø Â
 
­
ÓûÜÌò‰Î¬¬'þÕ,¢' u“ì¹ì÷(Ü÷(
0Κ)~üµ(e**,Â-
²ãf³°g’BÎäÐ(KÙíˆ\ý)$‚*¦Ó$ý)4‚*%ŒŒ*
ŸÎŸÎüý) óÜoC!£*üØ)K$î)þÕ,ä)žÚ²ŸÎºžÚŸÎ+L°ŸÎŸÎ¦ÓøóÜ£
\,L,µ×,$›,¦Ó?4,\¤,$©,¦Ó$¤,4©,ü, ÏÓbA"&\³,$¸,¦Ó$³, 4¸,& ü,/óÜ|M" Ã,Ä, üå*ß
$ù*þÕ,ï*žÚëŸÎóŸÎIþÕ|ΟÎ>žÚëŸÎóOµ×¼¦Ó¦ÓzÏÓY¦Ó,óÜÿÎÝÎã\ü-$.¦Ó$ü-4.,Š.dŠ.$.¦Ó%4.Ôü-±Øo>!%Œš. 
ŸÎŸÎ üü-/¤ÙoC" °.±.ü¥-Œ
$Ê-þÕ,³-Î,º-žÚèŸÎðŸÎTŸÎ'þÕ@žÚâŸÎêPî SŸÎŸÎ¦Ó³¦Ó±Øe¤ÙÎðÎö \ç/$ì/¦Ó$ç/4ì/,õ/dõ/$û/¦Ó%4û/Ôç/±Øo>!%,…0
d…0$0¦Ó
% 40$ üç/*óÜK" 0—0ü’/… $µ/þÕ,ž/Î,¥/žÚŸÎ ŸÎnŸÎAþÕZžÚìŸÎôþÕ [î ^˜¦ÓĦӱØv¦Ó<óÜÎðÎö$²1\²1$·1¦Ó&4·1ü™1%Ä™1ÿÛ;,1Å1'üÍ0xƒýOã0 ÎLÙ0ÎŒŸÎ¹þÕÒ#V¦ÓÞÿۿΡ üà20 $÷2\÷2$ü2¦Ó&4ü2üà2#´à2ˆÎ<,Š3
¢,„3
ŠÎ]?d„3,Ø2—3' 3ü‰2Ž –34 ýOª2íýL“2Î,ž2ÎnΟÎHþÕbÎ|Hî K¨¦ÓˆÎlðÿÑÎΠü65 $˜6\˜6$6¦Ó&46ü6#´6ˆÎ<,°6
¢T¥6
Î]?Œ¥6,ù5½6' µ6üª5“ ¼64 ýOË5íýL´5Î,¿5ÎnΟÎHþÕbÎ|Hî K¨¦ÓˆÎlÚƒÑÎΠüâ7? $ù7\ù7$þ7¦Ó&4þ7üâ7#´â7ˆÎ<,8
¢¤†8
ŒÎ]?܆8,Ú7¨8'  8ü‹7 §84 ýO¬7íýL•7Î, 7ÎnΟÎHþÕbÎ|Hî K¨¦ÓˆÎlćÑÎÎÂ,î9”‚:4‡:
Î$:,Ž:l‡:”³:4¸:
Î$³:,¿:l¸:Ö:ü’9ÄýO½9íýL™9Î,¤9,±9ýO¬ýO+î .˜3h¢ŠêÖŠ¼lË;\Ë;
tÎ,Ã;ß;'ü‚;]ˆýO•;íýL‹;ΈCŸŒ¥Îˆ
$€=\€=$…=¦Ó%4…=,Ž=dŽ=$”=¦Ó%4”=Ô€=±Øm>!üé<2´é<ˆÎ=  =¡=+; ü´<mÎ$Ú<Î$Ä<Î,Ê<ŸÎÒŸÎ4þÕMŸÎþÕ+Aî D¦Óz¦ÓM±Ø.ˆÎÎðÎöÎüÎ
$º>\º>$¿>¦Ó%4¿>,È>dÈ>$Î>¦Ó%4Î>Ôº>ÏÓm>!ü£>2´£>ˆÎ= Ú>Û>+; üõ=fŠÎ$”>Î$þ=Î,„>ŸÎÒŸÎ4þÕMŸÎþÕ+Aî D¦Óz¦ÓMÏÓ.ˆÎÎðÎöÎüÎ $ÌA\ÌA$ÑA¦Ó%4ÑA,ÛAdÛA$áA¦Ó%4áAlÚA
šŸÎ?"ÜÌA±Ø@!üµA3´µAˆÎ= íA îA+ ;
ü‚Al Î$¦AÎ$AÎ,–AŸÎÒŸÎ\þÕuŸÎŸÎCþÕ\Jî Mˆ ¦Ó«¦Ó~Å•_±Ø>ˆÎÎÎÎÎ
$ C\ C$¥C¦Ó%4¥C,®Cd®C$´C¦Ó%4´CÔ C
†ñŸÎŸÎxI,ü‰C2´‰CˆÎH ÀCÁC+; üÌBuŒÎ$úBÎ$äBÎ,êBŸÎÝŸÎ?þÕXŸÎþÕ6Aî D¦Ó¦ÓXÄ™9ˆÎÎðÎöÎüÎ$ïD\ïD$ôD¦Ó%4ôDdîDÅ•9üÕD&ÄÕDÿÛ8 €EEü¯DRÎ$ÆDÎ$½DŸÎ£ŸÎÑþÕé#T¦ÓöÅ•ÖÿÛºÎΡô*HÄJ ÖÇô*дJØô*ÃS%CÖÇô*u8::MAXÁþ*øøJVHÂKÖÇô*þ*ø²K Ûþ*ÇS&>ÖÇô*0ÕP ]åPñ]çª 
!   ô* ]ÞP
ï_ë  U&S
´¼´¼K¶¼á_’raÎ$Àl¸   ô*ð-¸
ÆË
Ì`ð-ð- ø
ýùت. Iݪ 
`æPñçª ùݪ) ûPüPø÷O…ã Ž\X¬Pë (“Pó¢PšP ó¢í–½–½ ArgumentsÁ˜½templateÁÁ]™½þÁ]¤í¤>ÜIšÐìé -é E¦¡ð-M¦¡-ï¡_ †¥ké tÉælËþ˜þ¤/‚¡œ¢¿í¢¹ó¢|ó¢ƒ0R _­Rñ_çª 
!   þ* _¦R
ï_ê¦ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢éñçª ùݪ) ÃRÄRø¿Q…æ.5 Ž\XôQê¦(ÛQó¢PâQ’¤ž¤è¦v覎†¥ˆ¦¡h¯¥£è¦¬iælkþÐþÜϧƜ¢öí¢Oó¢ó¢"À+%ðÈÀ+ì*À+ÏS?^ðÈÀ+u16::MAXÁÊ+ðÈÀ+Ê+ï(Ê+ÔS=VðÈÀ+ aåPñaçª 
!   À+ aÞP
ï_­ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢ñçª ùݪ) °®É­÷¼)0 Ž\ª‚­¨ó¢¦’¤Žž¤€­k€­ƒ†¥}¦¡]¥˜€­¡
ælþÇþÓu™­¾œ¢îí¢Gó¢Âó¢ÉF c­Rñcçª 
!   Ê+ c¦R
ï_®± U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢-ñçª ùݪ) EC^BúQ)0 Ž\?®±=ó¢;’¤»ž¤¬±k¬±ƒ†¥}¦¡]¥˜¬±¡¢æl¥þÇþÓ
ű¾œ¢îí¢Gó¢Wó¢^Œ,Z c ‰ÊŒ,Y h Œ,ÝS} œ ‰ÊŒ,u32::MAXÁ,^ [ ‰ÊŒ,–,Y ƒh –,âS}  ‰ÊŒ,Y  eåPñeçª 
!   Œ, eÞP
ï_· U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢@ ñçª ùݪ) ð
î
 í
ü
)0 Ž\ê
·è
ó¢æ
’¤Î ž¤À·kÀ·ƒ†¥}¦¡]¥˜À·¡M ælP þÇþÓµ Ù·¾œ¢îí¢Gó¢ ó¢ 
 g­Rñgçª 
!   , g¦R
ï_î» U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢m ñçª ùݪ) 
ƒ
ž

Ž
)0 Ž\
î»}
ó¢{
’¤û ž¤ì»k컃†¥}¦¡]¥˜ì»¡â
ælå
þÇþÓJ …¼¾œ¢îí¢Gó¢ ó¢ž Ø,ž§¢ËØ,¬Ø,ëSÁà¢ËØ,u64::MAXÁâ,¦£¢ËØ,â,¡°â,ðSÅÞ¢ËØ,¡ iåPñiçª 
!   Ø, iÞP
ï_ŠÂ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ùت. Iݪ í¢ˆñçª ùݪ) 86Q5ŸD)0 Ž\2ŠÂ0ó¢.’¤ž¤ˆÂkˆÂƒ†¥}¦¡]¥˜ˆÂ¡æl˜þÇþÓý¡Â¾œ¢îí¢Gó¢Jó¢QÎ k­Rñkçª 
!   â, k¦R
ï_¶Æ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ù ت. I ݪ í¢µñ!çª ù ݪ) ÍËæÊ¢Ù)0 Ž\ǶÆÅó¢Ã’¤Cž¤´Æk´Æƒ†¥}¦¡]¥˜´Æ¡*æl-þÇþÓÍÆ¾œ¢îí¢Gó¢ß󢿤-î÷»Ì¤-í¨ü¤-$ùS0»Ì¤- u128::MAXÁ®-ÿü»Ì¤-®-ú« ®-$ÿS7»Ì¤-ú måPñmçª 
!   ¤- mÞP
ï_ãÌ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ù"ت. I"ݪ í¢áñ#çª ù"ݪ) ªŽ³)0 Ž\ãÌó¢’¤ož¤áÌká̃†¥}¦¡]¥˜áÌ¡îælñþÇþÓVú̾œ¢îí¢Gó¢£ó¢ª' o­Rñoçª 
!   ®- o¦R
ï_Ñ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ù$ت. I$ݪ í¢ñ%çª ù$ݪ) &$?#2)0 Ž\ Ñó¢’¤œž¤Ñkу†¥}¦¡]¥˜Ñ¡ƒælþÇþÓë¦Ñ¾œ¢îí¢Gó¢8ó¢?ð-?HÔÍð->¼Mð-,‰TbÔÍð-
usize::MAXÁú-IFÔÍð-ú-D¿Sú-,ThÔÍð-D qåPñqçª 
!   ð- qÞP
ï_­× U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ù&ت. I&ݪ í¢+ñ'çª ù&ݪ) ÛÙôØÇç)0 Ž\Õ­×Óó¢Ñ’¤¹ž¤«×k«×ƒ†¥}¦¡]¥˜«×¡8æl;þÇþÓ Ä×¾œ¢îí¢Gó¢íó¢ôq s­Rñsçª 
!   ú- s¦R
ï_ÙÛ U&S
¦¡c k ï¡z
ˆœ¢ š
Ÿ¨ù(ت. I(ݪ í¢Xñ)çª ù(ݪ) pnmÊ|)0 Ž\jÙÛhó¢f’¤æž¤×Ûk×Ûƒ†¥}¦¡]¥˜×Û¡ÍælÐþÇþÓ5ðÛ¾œ¢îí¢Gó¢ó¢¬0
ÁÂ%Ž)0Å)7>L
ÁbÂoŽ)zÅ)ˆ5\¤±¸»$é:Žá$ï:Ï,õ:q¦Dä=ªÐD†`«ß¬õtˆ¿­Š„„®¡ÔñͯÂ|ýá°àÌõ²ôö³§´•!´ÅÜÿEµèÔ‰UŠìÉ…·Ü®¹ÙÄœ ºˆă½ÿôå$¾ú üü-"¿¼
üÞ7!ÀüÓ¼âüÓÜ5×5
Generate types for C-style flags with ergonomic APIs.
# Getting started
Add `bitflags` to your `Cargo.toml`:
```toml
[dependencies.bitflags]
version = "2.10.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
}
}
```
## 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.
Á5\¤±¸»uvŽáuÏtq¦sªÐr«ßq¬õp­Šn®¡l¯Âj°àh²g³§f´ÅeµèdŠc·a¹Ù`ºˆ_½ÿ^¾ú ]¿¼
[ÀÑÔ×Üà:ÎÑÃÆ¸»dþ:üQL
Yield the bits of a source flags value in a set of contained flags values.
Á$†; *á$_Ï ,eq
¤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.
Á  ©âó' §ó'À'á☚8(„
&(œ¹  €(TÒ  ´á ÅŸ æqó'À'üþ$ŒÎ Îó'À' 
ó'ŸĊ ÅŸ ÕŸ<À'üà\¡Ï Ò Ù8°œí Ö3ó'ó'À'
ó'Â[ 
d­
müÇ# ÅŸ ÌÖ À'ßKàK ó'ü…($ˆÏ ÏÀ'ø°ú°û°Ðü°ý°þ°ìHˈXêE>À'ßK 
ó'$üø
ü¥ ÒÍ
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.
Á ÅŸ ÕŸ<€(ÓûÜÌò‰&(ÌŸË¢¾ð-LÎó'dÝó'Üî  ÅŸ óÖ €(!ü$žÐ Ðó'€( ©µ1ÂÜì€ ##ÅŸ ÕŸ€($%üÙ\¡È Ë Ò8°œæË¢ó'ó'€(""â2¤  
­ ­
¶ ìËü³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ÒÑ Ñ€( Ñó'" Ü"©9üŒ( ''ÅŸ Ö ,”€(()ßKàK) && ó'üß(Ò Ò€(ø°ú°û°Ðü°ý°þ°ìHˈXêE>€(ßK& ç&
)ó'ü“"'üØ ºµ
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.
Á„ž" ++ÅŸ ¯"ÕŸ<²"Ñ(²ãf³°gB,-$&ÌÁ",Á"**Ë¢Tà"à"**ð-üï"" //ÅŸ ô"Ö ,÷"Ñ(0ܘ#¦#Ñ(..
0ó'ü•$/ 22ÅŸ š$Ö ,$Ñ(34ßKàK4 LË$$Ð$11»®üï$($ò$Ó ÓÑ(ø°ú°û°Ðü°ý°þ°ìHˈXêE>Ñ(ßK1 ÷$1
4ó'$ü$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”;<?CFHKNQÁÂÆÍÁ]57WriteÁ,ü`58$Ž5:,—q5;ÄêWð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Ô Ôó'Ü[Ž\ =>>= ¸ÅŸ §©âÜ[Ö NÙ=D‹`Ü[«ŽÂ˜4æl4À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»Õ ÕÇ| @@ ÕÅŸ ÄÖ QÙ=D‡Ñ’†ë@%'¨?<closure_kind>ÁA<closure_signature>ÁA<upvars>ÁAA?ÑyÉ?ñ¾B‰¿B¦¿BB?©~ü‡yüÈ>9
Write a flags value as text, ignoring any unknown bits.
Á”ŽÖ Öó'Ü[Ž\ DEDE ²ÅŸ ¡×¼Ö ï¼ý¼
Có'Ü[Â>GælGG<>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.
ÁŒÛ× ×Ç| GG þÅŸ íÖ °¿
Fó'’†eI#%üË^üûOJ
Write only the contained, defined, named flags in a flags value as text.
Á„ÒØ Øó'Ü[Ž\ IJJI ôÅŸ ã×¼T„ Ö ý¼,‰
Hó'Ü[ÂûMæl4ü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.
Á|È$Ù ÙÇ| LL é$ÅŸ Ø$Ö ,Û$
Kó'’†çU¸+Kñ¾M‰¿M¦¿MMK–¨”’-ü­,d_
Encode a value as a hex string.
Implementors of this trait should not write the `0x` prefix.
ÁDœ-NNªâÎü’-xN Ë ËOOOüË-=Ü«- Write the value as hex.ÁLÎ-Ú ÚÎæŽ\NæPP ç-N©â¨Ì Ø-‹`¨ÌTÛ-
OΨÌ$è-æl4î-/1”´.üŒ.'"
Parse a value from a hex string.
ÁD¾.QQ Ëü´.‘Q Ë ËRRRüï.TìÍ. Parse the value from hex.ÁLò.Û Ûê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ÎŽ)Q ƒ/Q©âÎ,½/
RÎ’†,ü.|¦3Ž)TVXüé38ü¼3(% An invalid hex flag was encountered.Á„ð3ܺŽ)S¨UUS©âܺŒ‡4å`ܺdŒ4
Tܺ‡=‰]#%üÞ6:ü‡6RO A named flag that doesn't correspond to any on the flags type was encountered.Á”å6ܺŽ)S¨WWS÷ÐŒþ6ˆÑdƒ7
Vܺ‡=Ø^ü½9!ü€985 A hex or named flag wasn't found between separators.ÁTÊ9Ž)SS¥wü˜: Ž)Zæ`Zü¿:8Â:ÜÝÞ ÜŽ) ÝÁ`Á`œÃ`è Á]Ä`DzÁ]Ê­\É:•ÞŽ\Y Æ:Y
Z$Ç:þ Í:üë@%»Õ@ Ø@ è@8<Ù@ á@7,ã@¼Ó@Ž)T;4¡;Ÿ ÏÍÁ]\^BitAndÁ4Ãî\`BitOrÁ,'ãï\aBitXorÁ4.ƒñ\bNotÁ6˜\c£ $Q\e¿TdÁ\gîDpQ\hÇDzN\9·¹¥§|~jlüDB`bUWGI:<|“ kkÅŸ ˜³*lmnopü—6ü©id
Define a flag.
If `name` is non-empty then the flag is named, otherwise it's unnamed.
Á¤½®ó'³*jj
ló'ÿ
†a˜aüê(üømh
Get the name of this flag.
If the flag is unnamed then the returned string will be empty.
Á$÷ß ß³*½®j üjÊHüçü²0+
Get the flags value of this flag.
Á,ôà à³* àó'j új¬Iü­$ü¨{
Whether the flag is named.
If [`Flag::name`] returns a non-empty string then this method will return `true`.
ÁDºá á³*j ÃjÈTü… &üýƒ~
Whether the flag is unnamed.
If [`Flag::name`] returns a non-empty string then this method will return `false`.
ÁT’ â â³*j j
pó'üï üÔ š 
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>());
```
ÁqqÍÏ,€ÎqÍÏ"ÓéÍÏ.Óé)rstuvwxyz{|}~ƒˆŠŒrstuvwxyz{|}~ƒˆŠŒ©âŸÎ„ƒŽŸÎÛêìêŒy|tŠwz}ˆuxƒ{~vü¸"ì– The set of defined flags.Á,¾qq »Ïìá The underlying bits type.Á$ˆqq”Èü™*' Get a flags value with all bits unset.Á,ËÎqqŸŒ„Íüš.+ Get a flags value with all known bits set.ÁÐÎqqµ×üö'ü²?< This method will return `true` if any unknown bits are set.Á¬ùã ãÎq q
vÎ$ìÚüã" Get the underlying bits value.ÁŠËü’C@ The returned value is exactly the bits set in this flags value.Á$Ýä äΟÎq âq¦Óüì.ôý Convert from a bits value.Á Ëü¨?< This method will return `None` if any unknown bits are set.ÁLïŸÎÿÞqq
xÎÓQoüŽ/üÏ:7 Convert from a bits value, unsetting any unknown bits.Á”‘ŸÎÎqqÿÛÓäpü°.ü…&# Convert from a bits value exactly.Á„³ŸÎÎqqˆÎÓü¢ (üä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¥ å åÿÞq µ q
{Îÿ
×süÍ$"ü‚#*' 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.Á$Ð$æ æÎ—ëq Õ$q
|Î$Ö$ü”'-ü›%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—'ç çÎÉìq ¢'q
}Î$£'üµ(7üò'>; Yield a set of all named flags defined by [`Self::FLAGS`].Á”¸(ˆîqq
~ÎÔØ)ü )30 Whether all bits in this flags value are unset.ÁDÛ)è èÎq ä)q
Î$å)Äå*ü©*74 Whether all known bits in this flags value are set.Á4è*é éÎq ï*q
Î$ð*ü¥-HüÊ,VS Whether any set bits in a source flags value are also set in a target flags value.ÁT¨-ê êÎÎq ³-qÍÏ,ç-
Î$´-î {ü’/Fü·.VS Whether all set bits in a source flags value are also set in a target flags value.ÁD•/ë ëÎÎq ž/qÍÏ,Ò/
Î$Ÿ/î }üÍ05ü0+( Remove any unknown bits from the flags.ÁDÐ0ì ìÎýOq Ù0qÍÏ,ü0
ƒÎ$Þ0ü‰2@üË196 The bitwise or (`|`) of the bits in two flags values.Á4Œ2í íÎÎýOq “2qÍÏ,Ã2¢Š$˜2î &€üª5@ü3`] The intersection of a source flags value with the complement of a target flags value (`&!`).Á4ËüŠ4WT This method is not equivalent to `self & !other` when `other` has unknown bits set.Áüæ4?< `remove` won't truncate `other`, but the `!` operator will.Á4­5î îÎÎýOq ´5qÍÏ,ä5ÖŠ$¹5î aü‹7@üÃ6C@ The bitwise exclusive-or (`^`) of the bits in two flags values.Á4Ž7ï ïÎÎýOq •7qÍÏ,Å7
Î$š7î +€ü’9Jü®8_\ Call [`Flags::insert`] when `value` is `true` or [`Flags::remove`] when `value` is `false`.Á•9ð ðÎÎýOq ™9qÍÏ,Ö9
Î$ž9î ǘÆü‚;2üÜ:! Unsets all bits in the flags.Á,…;ñ ñÎýOq ‹;qÍÏ,®;
ˆÎ$;ü´<*üå;:7 The bitwise and (`&`) of the bits in two flags values.Á,\¤<d·<ÎÎÎqq
Φ~î £~üõ=#ü§=9á‚,\å=,ø=ÎÎÎqqðÿ=}î :}ü‚A(üá>`…„Æ?ËüÎ?Wù„üª@C@ `difference` won't truncate `other`, but the `!` operator will.Á,\ò@T…AÎÎÎqqÚƒ|î 
|üÌB2üôACƒ‡,\¼B¤ÏBÎÎÎqqć‰zî †zܯDüÇCSP The bitwise negation (`!`) of the bits in a flags value, truncating the result.Á,\ŸDT²DÎÎqq
ÎÊyüÆEºü…E@;
A bits type that can be used as storage for a flags type.
Á$ÐEŽŽ
ÍÏ,íFÞÎ,ÚEþÎ$æEžÎÎLñEÃîÎάFÎÎÅîÎlˆFãïÎΤFÎÎåïÎl£FƒñÎά¸FÎÎ…ñÎl¿F˜Î”ÔFÎÎlØFÓé<ùFŽÍÏþ¬’ô¼’êÌ’Üà’Íõ’»¬¢“šº“Ï“yç“o÷“bÓé`ÍÏL¬’C¼’:Ì’-à’õ’¢“ﺓàÏ“Îç“Ä÷“·Ó鵌¬Gü‡G  A value with all bits unset.Á,²GŽŽÎ|çGôÄG A value with all bits set.ÁíGŽŽÎœ‡IL‘I Ë´‡I Ë Ë´ŸIL¬I ¶I ¯S ¼I ÎI, ½I ¾I ÌI
, ¿I8 ÀI& ÁI8ÂI$ ÄI, ÆI8» ÇI& ÈI8ÉI$ ËI
ÍI*ÐI ÓI ­S, ÝI ÞI ¦S08$ìI8$ñI8
öI, úI8×– ûI ýI ÛJ8,J8Å,•J& šJ, œJ8×– J ŸJ7ì ¡J% ¢J8,´J8ÒºJ& ½J, ¿J8×– ÀJ ÂJ ÄJ, ÅJ8×– ÆJ ÇJ'ÈJ8MAXÁÊJ% ÍJ8$êJ8$ïJ8
ôJ, øJ8» ùJ ûJ ßK8,K8Å,“K& ˜K, šK8» K K7ì ŸK%  K8,²K8Ò¸K& »K, ½K8» ¾K ÀK ÂK, ÃK8×– ÄK ÅK'ÆK8¼™ÈK8ÌK, ÏK8» ÐK% ÑK8$îK8îDóK8
üK, €L8×– L ƒL ÐM 8 •L8ýL˜L ¡L ­L8’†,¢L& §L ©L8œªL(¯L8ý4²L ¸L8$¹L$ ½L8¿T¿L ÉL ËL ÂM
 áL, âL8×– ãL äL'åL8from_str_radixÁtçL õL ÿL8’†,öL$ ûL716ÁýL €M8
<M ˆM °M ‰M8 ŠM M8¿TM'—M8„™M ©M ¯M8’†,ªM8$ßM8îDäM8
íM, ñM8» òM ôM ÁO 8 †N8ýL‰N ’N žN8’†,“N& ˜N šN8œN( N8ý4£N ©N8$ªN$ ®N8¿T°N ºN ¼N ³O
 ÒN, ÓN8» ÔN ÕN'ÖN8ÚtØN æN ðN8’†,çN$ ìN7”žîN ñN8
<òN ùN ¡O úN8 ûN üN8¿TþN'ˆO8„ŠO šO  O8’†,O8$ÐO8ÇDÕO8
ÞO, âO8×– ãO åO ‰Q8 ÷O8ÖLúO ƒP8æ „P& …P8͇P'ŠP8˜¹,ŒP ‘P P §P “P8$”P$ ˜P8šP8æl4žP& ¤P8æ ¦P(©P8ͬP'¯P8ý4±P ¸P ûP8writeÁ,ÎP ÓP ÔP éP8æl4ÕP$ ÛP7{:x}Á4ÝP$ ãP8$åP8$˜Q8ÇDQ8
¦Q, ªQ8» «Q ­Q ÑR8 ¿Q8ÖLÂQ ËQ8æ ÌQ& ÍQ8ÍÏQ'ÒQ8˜¹,ÔQ ÙQ ÚQ ïQ ÛQ8$ÜQ$ àQ8âQ8æl4æQ& ìQ8æ îQ(ñQ8ÍôQ'÷Q8ý4ùQ €R ÃR8¸¤,R R œR ±R8æl4R$ £R7ï¤4¥R$ «R8$­R8$àR8ÜLåR8
ïR, óR8» ôR öR ÷R8$…S8ÜLŠS8
”S, ˜S8×– ™S S œS
§S¬ûTüšT>; A trait for referencing the `bitflags`-owned internal typeÁüÙT! without exposing it publicly.Á\…U ËüûT¼ Ë Ë©âÎÔÃU¸«LÓU°«È«©âÎt§Vå«ÌÃUü—U'$ The type of the underlying storage.ÁLÈUl§VüãU?< The type of the internal field on the generated flags type.ÁD¬VüþV6¡»V ¾V ÅV8°4¿Vt¹Vuse the `Flags` trait insteadÁüÈV5DˆWÙ¬ ËüþV½ŸÎÔ’WqÎ,¯W Ë9­®-½®$ ËK­®?½®6—˜˜©âÎüþW!ÞK‘¯¬‰X‘¯ßKÎ\’X‰¯,¢¯!²¯©âΘüƒY6ÞKà¯ü“Y%à¯ßK½®ÎÜœYد2ñ¯'‚°üþW ü»W>; An iterator over enabled flags in an instance of the type.Á$ƒXÙ¬üƒY5ü¥XYV An iterator over the raw names and bits for enabled flags in an instance of the type.ÁLˆYÙ¬ìÒY ššÅŸ ×YÖ ,ÚYó'›œ˜LöY$ûYÀ't˜ZLZ€(üÃZ/ žžÅŸ ÈZÖ ,ËZó'üš]$ü÷Zeb A marker trait that signals that an implementation of `BitFlags` came from the `bitflags!` macro.ÁÝ[Ëüá[c` There's nothing stopping an end-user from implementing this trait, but we don't guarantee theirÁüÅ\EB manual implementations won't break between non-breaking releases.Á¡] ] —]8°4]t‹]Ô¤]ŸŸ Ëüš]'Ÿ Ë ËÄÃ]LÒ]íÔò]Ÿ¢ü\Ž^£üê]0&(Œ¹;¡¬; ¯; ¶;8°4°;tª;LÁ;³$‡=¨ísŸ§¢üu§£üÃ<5œË<Œã<CED±=„Ü=ƒk¬ù_üùKïê
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;
}
}
```
Á&|é_wu ` ñ}  •` b, Ÿ`  ` ¯`+ ¡` ¢` ®`, £`8outerÁ,¤`& ©`8«
$ª`
°`, º`8¬»`& ¾`8¬¿`84Ã`, Ê`8¦DË`& Ó`8Û,Ô`& Ù`, Û`8 Ü`& Ý`8Þ` á` èa, ï` ð` Ýa, a ƒa  a+ „a …a Ÿa, †a8 ,‡a& Œa8Û,a, “a ”a a, •a8þ$a& ša8a
ža
¡a8,³a, ¹a8á$ºa& ¾a8¿a Âa, Äa8˜,Åa& Êa8ï$Ëa% Ïa
Þa, óa ôa úa, õa8 öa& ÷a8øa
ûa*ƒb †b s, üb8,ýb'c8àÌ„c c Ÿc åc, ­c ®c ¸c+ ¯c °c ·c, ±c8‚Ì,²c
¹c, Çc8¬Èc84Ìc, Óc8¦DÔc, »d8,¼d'Ád8ŠìÃd àd âd f, ðd8¦Dñd& ùd, ûd8 üd þd ˆf, e e ùe
, §e ¨e ¼e+ ©e ªe »e, «e8 ,¬e, ²e ³e ¹e, ´e8þ$µe
ºe
½e8,Óe, Ùe8á$Úe ße, áe8˜,âe% çe
úe+ f žf •i8è,Ÿf ¤f ”i8áL²f$ »f8ÿTÉf$ Óf8unused_doc_commentsÁœáf$ ôf8unused_attributesÁŒ‚g$ “g8
unused_mutÁT¡g$ «g8ût¹g$ Çg8non_upper_case_globalsÁ´Õg$ ëg8Æ4ùg'ÿg8assign_op_patternÁŒh$ h8Æ4 h'¦h8indexing_slicingÁ„¨h$ ¸h8Æ4Æh'Ìh8same_name_methodÁ„Îh$ Þh8Æ4ìh'òh8iter_without_into_iterÁ´ôh$ Ši8,Ÿi8 ¥i& ¦i ¨i ©i «i ­i Îr$, Äj8,Åj'Êj8ÜÌj çj éj ¨k, ûj8¬üj84€k8InternalBitFlagsÁ„‡k& —k, ™k8 šk, ·k8,¸k'½k8ÙÄ¿k ×k Ùk ·m8ÅØ„ëk& ûk, ýk8 þk$ ÿk, l8¦Dl l ©m, ¡l ¢l m
, ¼l ½l Ñl+ ¾l ¿l Ðl, Àl8 ,Ál, Çl Èl Îl, Él8þ$Êl
Ïl
Òl8,ìl, òl8á$ól øl, úl8˜,ûl% €m
—m, n8,“n'˜n8ˆÄšn ²n ´n ‰p8ÅØ„Æn& Ön, Øn8 Ùn$ Ún, Ün8¦DÝn æn ûo, ün ýn èo, —o ˜o ¬o+ ™o šo «o, o8 ,œo, ¢o £o ©o, ¤o8þ$¥o
ªo
­o8,Ço, Ío8á$Îo% Òo
éo, ˜p8,™p'žp8ô p ¾p Àp þp, Òp8¦DÓp& Ûp, Ýp8 Þp$ ßp8ÅØ„áp, q8,Žq'“q8èÔ•q ¯q ±q Ùq, Ãq8¦DÄq, èq8,éq'îq8ÅÜðq r r Är, Ÿr8¦D r& ¨r, ªr8 «r$ ¬r, ®r8¦D¯r% Ïr, Úr8,Ûr'àr8ÐDâr êr ìr ‰s, úr ûr þr, ür8ÝÏ ýr
ÿr% s s ÷t,  s ¡s °s+ ¢s £s ¯s, ¤s8‚Ì,¥s& ªs8«
$«s
±s8$»s, Às8¦DÁs& És8Û,Ês& Ïs, Ñs8 Òs& Ós8Ôs ×s Þt, ås æs Ót, øs ùs t+ ús ûs •t, üs8 ,ýs& t8Û,ƒt, ‰t Št “t, t8þ$Œt& t8t
”t
—t8,©t, ¯t8á$°t& ´t8µt ¸t, ºt8˜,»t& Àt8ï$Át% Åt
Ôt, ét êt ðt, ët8ÝÏ ìt& ít8ît
ñt*ùt üt à}, †u8,‡u'Œu8ŠìŽu «u ­u Ýv, »u8¦D¼u& Äu, Æu8 Çu Éu Óv, Ûu Üu Äv
, òu óu ‡v+ ôu õu †v, öu8 ,÷u, ýu þu „v, ÿu8þ$€v
…v
ˆv8,žv, ¤v8á$¥v ªv, ¬v8˜,­v% ²v
Åv+ èv év ”y8è,êv ïv “y8áLýv$ †w8ÿT”w$ žw8ÁÔœ¬w$ ¿w8æÔŒÍw$ Þw8‰ÕTìw$ öw8ût„x$ x8·Õ´ x$ ¶x8Æ4Äx'Êx8ñÕŒÌx$ Ýx8Æ4ëx'ñx8Ž×´óx$ ‰y8,žy8 ¤y& ¥y §y ¨y ªy ¬y Ÿ}, ºy8,»y'Ày8§´Ây Øy Úy Ï{ , ìy íy ÷y+ îy ïy öy, ðy8‚Ì,ñy
øy, Šz8¦Dz& “z, •z8 z$ —z, ™z8¦Dšz £z Á{, ¹z ºz ®{
, Ôz Õz éz+ Öz ×z èz, Øz8 ,Ùz, ßz àz æz, áz8þ$âz
çz
êz8,„{, Š{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.Á¡É Ì Ó8°&|·Úˆ ó ã° ù š‹(8paramsÁ4‰& , 8$& 8Û,—$ œ, ž8Ó& £8Û$ ©, «8ÿ
& °8Û$ , ¸8î & ¾8Û,¿$ Ä, Æ8˜& Ì8Û% Ò, Ü Ý ì+ Þ ß ë, à8‚Ì& æ8«

í, ÷8PublicBitFlagsÁ& †‚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 Û„8žLÞ„ ç„ ì„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 ô…8ûT÷…  ކ ‚†8$ƒ†$ ‡†8î ,‰†, 8intersects_bodyÁ|‘†&  †8ó,¡†8 ³†8ŒD¶† ¾† ˆ ¿†8$À†$ Ć8î ,Ɔ, ͆8
contains_bodyÁlΆ& Û†8ó,܆8 î†8ª4ñ† ÷† ˆ‡ ø†8ù†8$ý†$ 8î ,ƒ‡, Ї8 insert_bodyÁ\‹‡& –‡8ó,—‡8 ©‡8·4¬‡ ²‡ Ç ³‡8´‡8$¸‡$ ¼‡8î ,¾‡, Ň8 remove_bodyÁ\Ƈ& ч8ó,Ò‡8 ä‡8Ä4ç‡ í‡ þ‡ î‡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ÁT´‰& ¾‰8ó,¿‰8 щ8TÔ‰ Þ‰ ê‰8$߉$ ã‰8î ,å‰, ì‰8difference_bodyÁ|í‰& ü‰8ó,ý‰8 Š8¤’Š ¦Š ²Š8$§Š$ «Š8î ,­Š, ´Š8symmetric_difference_bodyÁ̵Š& Ί8ó,ÏŠ8 áŠ8¬TäŠ îŠ óŠ8$ïŠ, õŠ8complement_bodyÁ|öŠ& …‹8ó,†‹*œ‹ Ÿ‹ à° + ©‹ ª‹ Ú‹8è,«‹ °‹ Ù‹8áL±‹$ º‹8ÿT¼‹$ Æ‹8æÔŒÈ‹, ä‹ å‹ ï‹+ æ‹ ç‹ î‹, è‹8‚Ì,é‹
ð‹8$ú‹, ÿ‹8¸õt€Œ Œ Ú°<‡ìüŒ*+ ÔŒ ÕŒ ÜŒ8þ4ÖŒ8êŒ8,îŒ8 ôŒ8¤,÷Œ üŒ ýŒ(ÿŒ8$‚, 8Ôö<íìü°.+ ë ì ó8þ8Ž8,…Ž8 ‹Ž8àŽŽ ‘Ž ’Ž(”Ž8$—Ž, ¬Ž8¬÷D­Ž<óîüÃŽ"<ËòŽ<©ïü‚C+ Ò Ó Ú8þ8è88 ò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¡—8µ—8 ¹—8žL¼— Å— Ñ—, Æ—8ÿ
$Ç—& Ë— Í—8œΗ(Ó—, Ö—8,×—'Ü—8ŽLÞ—'ç—8³$é—'í—8ä 4ï—'õ—8Ó4÷— ý—8$þ— ‚˜, ”˜8Àût•˜<Ÿüü±˜3+ ñ˜ ò˜ ù˜8þ4ó˜8‡™8,‹™8 ‘™8ßD”™ œ™ £™ , ž™8$Ÿ™(¥™8õ$¨™, ½™8¯ül¾™<®ýüÙ™7+ š žš ¥š8þ4Ÿš8³š8,·š8 ½š8î4Àš Æš Íš Çš, Èš8$Éš(Ïš8õ$Òš, çš8ý\èš<ÃþüV+ ä› å› ì›8þ4æ›8ú›8,þ›8 „œ8ûT‡œ ‘œ ¦œ ’œ, “œ8$”œ$ ˜œ, šœ8î ,›œ&  œ8$¢œ(¨œ8õ$«œ, Àœ8þ|Áœ<‰€üÞœV+ Á  É8þ8×88 á8Œ ì ž í, î8$ ó, õ8î & û8(ƒž8õ$†ž, ›ž8¡ÿlœž<á‚ü·ž9+ ýž þž …Ÿ8þ4ÿž8“Ÿ8 —Ÿ8ª4šŸ  Ÿ ¹Ÿ  ¡Ÿ8¢Ÿ, ¦Ÿ8$§Ÿ$ «Ÿ, ­Ÿ8î ,®Ÿ& ³Ÿ8$µŸ, ËŸ8®€\ÌŸ<O The intersection of a source flags value with the complement of a target flagsÁüåŸR< value (`&!`).ÁŒÄ <Ëâ <ù„üò W<Ù…üÖ¡?+ ¢¢ £¢ ª¢8þ4¤¢8¸¢8 ¼¢8·4¿¢ Å¢ Þ¢  Æ¢8Ç¢, Ë¢8$Ì¢$ Т, Ò¢8î ,Ó¢& Ø¢8$Ú¢, ð¢8¹\ñ¢<ƒ‡üŠ£C+ Ú£ Û£ â£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Ø„ŒÉ§<á‚üè§9+ ®¨ ¯¨ ¶¨8þ4°¨+ Ĩ Ũ Ψ8÷
Dƨ8ܨ8,à¨8 æ¨8C,é¨ î¨ ‚©, ï¨8$ð¨$ ô¨, ö¨8î ,÷¨& ü¨8$þ¨(„©8$‡©, œ©8Õ…T©<’Ÿüµ©R<”ª<˲ª<ù„üªW<®ü¦«C+ ö« ÷« þ«8þ4ø«+ Œ¬ ¬ –¬8÷
Dެ8¤¬8,¨¬8 ®¬8T±¬ »¬ Ϭ, ¼¬8$½¬$ Á¬, ì8î ,Ĭ& ɬ8$ˬ(Ѭ8$Ô¬, é¬8̆|ê¬<ƒ‡ü‡­C+ ×­ Ø­ ß­8þ4Ù­+ í­ î­ ÷­8÷
Dï­8…®8,‰®8 ®8¤’® ¦® º®, §®8$¨®$ ¬®, ®®8î ,¯®& ´®8$¶®(¼®8$¿®, Ô®8ȇÌÕ®<¢üü®S+ ܯ ݯ ä¯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.Á&|ë¾ —¿ ¯Á ¿ È¿, ž¿8 operationÁLŸ¿& ¨¿8ï$©¿$ ­¿ ¯¿ Ç¿, ¹¿ º¿ À¿, »¿8ÝÏ ¼¿& ½¿8¾¿
Á¿*Ê¿ Í¿ ¬Á ×À ¤ÁØÀ ÛÀ £Á, éÀ8,êÀ'ïÀ8Š„ñÀ Á ‚Á ™Á, ƒÁ8êÁL„Á$ Á Á ˜Á, ‘Á ’Á •Á, “Á8ÝÏ ”Á
–Á ¥Á ¦Á% ­Áì÷Áü²Á%" Expand the `bitflags_match` macroÁ¡êÁ íÁ ôÁ8°4îÁtèÁ&|ØÁ • àÉ Ò •Ã, ÓÂ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><ÒÉüäÍ'üãÉRO A macro that processed 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.Á¡×Í ÚÍ áÍ8°4ÛÍtÕÍ&|ÅÍ€° ŒÎ ›á ŽÏ ÑÏ, ˜Ï ™Ï ¶Ï+ šÏ ›Ï µÏ, œÏ8 ,Ï& ¢Ï8Û,£Ï, ©Ï ªÏ ³Ï, «Ï8þ$¬Ï& °Ï8±Ï
´Ï
·Ï ÁÏ ËÏ, ÃÏ8¿ ÄÏ& ÅÏ8ï$ÆÏ*ÓÏ ÖÏ ™Ò, àÏ8,áÏ'æÏ8¡ÔèÏ ‚Ð „Ð “Ò8ï$’Ð& –Ð ˜Ð Ð, šÐ8¿ ›Ð$ žÐ8attrsÁ,¬Ð& ±Ð ³Ð ˆÒ8 unprocessedÁ\òÐ& ýÐ ÿÐ —Ñ, €Ñ Ñ •Ñ+ ‚Ñ ƒÑ ”Ñ, „Ñ8 ,…Ñ, ‹Ñ ŒÑ ’Ñ, Ñ8þ$ŽÑ
“Ñ
–Ñ$ ˜Ñ8 processedÁLíÑ& öÑ øÑ ùÑ$ úÑ$ ‰Ò% šÒ Ô šÖ8ï$§Ô& «Ô ­Ô ·Ô, ¯Ô8¿ °Ô& ±Ô8ï$²Ô$ ¸Ô8ÉÝ,ÆÔ& ËÔ ÍÔ “Ö8ñÝ\ÛÔ& æÔ èÔ áÕ+ žÕ ŸÕ °Õ8¢ Õ, ¤Õ ¥Õ ®Õ, ¦Õ8þ$§Õ& «Õ8¬Õ
¯Õ, ÂÕ ÃÕ ÒÕ, ÄÕ8
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µÝ