rust #rustc 1.82.0 (f6e511eec 2024-10-15)HQ/X!-cf0494a9131b2aa9Wm~TP,-ebc7929af1c29611rustc_std_workspace_core݌4J wseu7%-6c926d8ae1864f14+ AsDisplayL <serde< +<<+A@<@  ,@|@@,<< arbitraryL<\bytemuckD<T,<<__impl_external_bitflags_serde<<̎L&&<&\&&&D'&<&T'&&"__impl_external_bitflags_arbitrary("(<(\(('!__impl_external_bitflags_bytemuck0!0<0T000example_generated <   %tests, $ dIter B inner done   __private_const_new   IterNames flagsidxsource remaining    # # # ' '' parser+++++++ to_writer2 +from_str4 4 4 +to_writer_truncate8 +from_str_truncate: +to_writer_strict< +from_str_strict> > +WriteHexA write_hexBW+ParseHexD parse_hex+Finvalid_hex_flagFinvalid_named_flagF empty_flag+JtraitsLLLLLLLLLL L L L LZ Z Z ZvalueZis_namedZ is_unnamedLFlagsaFLAGSaBitsaemptyaabitsa from_bitsafrom_bits_truncateafrom_bits_retaina from_nameaa iter_namesais_emptyais_alla intersectsacontainsainsertaremoveatoggleaseta intersectionaBa differenceasymmetric_differencea complementLzEMPTYzALLL PrimitiveL impl_bitsL PublicFlagsInternalLBitFlags  L   L LImplementedByBitFlagsMacroL __privatebitflags__impl_bitflags__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_constsinternal__declare_internal_bitflags__impl_internal_bitflags__impl_external_bitflags+ ParseError ++ParseErrorKind EmptyFlag InvalidNamedFlaggotInvalidHexFlag+LFlag  L LLL L LL L L L L L L LLLLLLL L LLLLLLL L L L!L"L#L$L%L& L' L(L)L*L+L,L-L. L/ L0L1L2L377"7&7*7272 impl Write47878 :7<7< >7B7E7Gimpl fmt::DisplayH!K7K7K7]7^7_7`7f7j7k7l7m7n7o7p7q7r7s7t7777777777777777777777777777777777ADaz}D     кП D     ˸n%U+ ӯU++ƽyU&U LLθ%zzD(D(A(A(}(}(zzD(D(A(A(}(}(zzD)D)A)A)})})zzD)D*A)A*}*})zzD*D*A*A*}*}*zzD+D+A+A+}+}+%% 'JDU Uz D <A <} <<t "%,*S  %, %$ %,& 8.8g % +v  %, %%%$  ',%4%L& % ) -x,4L/ 5 %%RF:`  @  %>=<;%%0 %%&0%% X ] bT& $ D&14 M jL$ %%T %   $  % %$ !|&%D  m% T G $  %   0 ܈    &%#$  f% 3  4   X  i% g  w  6 %       =&%\  퓧澸% %L퓧澸53 &7+|%C/%%c/flag <467$82!d$7,438=M !d$7,438=M  %Db%0 + "&$/,%);)%; *Lb%07b8p78$| %z+%E&$0,%4%L  " & ,L4P %N+  %(&0%%0%%   %&/ &,   ĩT0D+M2J1]J1 *̆ $ 5  -l++ +L5U(-(P    ($  *& &\ %$7 d4/ \  %̮ 8$ $HD p% W E  #t     4 t%8$ $HT o%WE  %t   t%8$$04 r%[H! (J 5̌  8$ $@  . 5      ? D    J1J1-J1}1 '%1D J1J1J"1  ' J1 J1n $KOt%mD6+Tol$  5:*  ĝ2f'+lI1]'Z1\'1B]%4(DnT$FnN nU$ ;^%<d]%4 9:L퓧澸K+qK(/5\;$/A8/8%)/%  %V%F55\%0+KK4 06K1+oD}$ >:U 6.7?8F'8G8H8 f' f(*L  $  D  T  l%, d L * H+ }X%X4EX5X$ 55,    *    4   L  U  /,  | 5    . % U!   l ,   4   L T &$  |   0 " "#"!0L P(% $ 7  4 ܱ L  t   {;;" G L ;;YL mr    ,    4   L T&,  | 5  4  )  )%$  4   L T&$ 0x5|  6  / / '&  8 !5! 5!)(a g m     ԳP ڜޡ  1BN\glr  &O.   [J 4  ; 0  J&[4* ?  4 -[   0  ;   6 3[   * ܽ L  4   < L  B;TOB  !8 p9[ + !+  2;   /   1    5     7     9     V,UC:EXF&QP\!$QP\\F$[ \mtQP\n""i""d QP\\^%%Z&\U%&%\  QP\))))QP\\,,-\,( QP\#////QP\\223\2 QP\{55w55sQP\\n88k9\g8"[/,TTR &/ : 9 + 5  [  T [g;/cZ ;^hT;\[g[_g`[PhQTG++-+ "+)+/+ 5  writerfirstu V     Գڑ\yP } j P +  jP jP jPaP {;;S 9 T TK 9 7 X T Tx `_&)91 &5T;TA4 TD d%C Љ.eՉ oo(P%ЉmՉ)d %& D U!-#1# D+! ###" m l|%"<1l|$ $ii SplitInternali hihimatcherhiallow_trailing_emptyhifinishedhޑil|!l| i$1l|$ 5!m m ;d %&  |% %&&5%\  } l5$0x55 % $ 5?KJԅ E;$ */'(%' U'AGFd j% $)3-.%;,- U;,-  d\  4 q%?1   P;  v|BQPYi D}  i +!"%- " !   + l|$ %&}& Dw% &&% Y T  U! ;&&(' F)L* &*&5(+ (+ j&*( φԳj&;+ (+*)?@i{ ),&S* %&,  (;-  ;&(f(l'r)* &);Œ' φ{;)*)Kx;8$  U;, %&&.- /0<20&941?41 j&074 φ{%141k0q/ABi{52&36 %&2  ;,.%-;- %&..-/#02/%3 φ{%/Y0_/Gx%  48 [bu|  Yo4nTnnnTn nCSplith ijғ l|S o4nTnx n9WIno5P;&&6%)&& 5u&!6%)-3"G5""4##4$#Q;& &&&& Q%&& ))*&);J%&7%)P&a ;,,',7%)-;,6.H5$.7//70/Q%& 2222 Q%&&6 556&53Գ%&5,%5d%2̈́̈́| 퓧澸5 +S 5 5$%7 9 +5 φ҆ӆxԆՆֆi׆֤{;4 Գ;& ، {;φ҆ӆxԆՆֆi׆֤{%~ ~ 9~ {%5P P; %0 %) +!Dp+ CharSearcherhaystacklfingerl finger_backlneedlel utf8_sizel utf8_encodedl|Dm p<+!D+-; ; && &{ &&8 )+=;,%(,% 2&5 2{% 2&k 5 input{ parsed_flagsH: :( parsed_flagm :$  #  @ a)mtM8> uv]%2mR!oR!qmR!s 5 6 ;5 852&6G5&& :[†5 _ref__flag84&7tXH5URO&:!†50#d$7,43 h%BR $7L 2%T,4,  8[/,T4/%; *h.Y7(% 3Cl 4%,)5 : ?  " "   7 %&     &  j&  φ{%  : @ F CDi{& %&2 [ %X φ{%      x%*  <P$7\4: "]Q%&XTPQ%&&KH &D5,%;/% Ǎ{%B+F%&]{M&w # &7%L!$! D!!T!S,!d!L!E!HF!&&4&&$!55,"   E# " 4"  L"T &," | 5 " " I"& & " l","" 4"  L"T &$"  |" " K"@' ='##[ #  co7BGM#  UI" #[S  1 ";K" $[ >+ : <!!!J" ġ"L"  " 7"C:/4"F&C0"QP\+"'"#"QP\\""\""QP\T""{" QP\\|v"s"\o"[ /,TTx&f:B9/+C5[g[KgL+ +   {hh  jP  j PW SY9TT9&T9&T4T)&T&D&m&C \ Xm;m85&d'' %& 'D1,)! D! I'.%o|O'pq>}$' 5  m y mv s N,d,, %& , ,,|(( %&&5* ! $*0x5D0] g(} 噍*? %&& *  S+G +F +d+u $+ $+3 0 - ,N'{! ! !  D!  ! ZQ" i+ !'A L!! D!  o}  L %&&  +!""%" &'#'# j&"' φ{%#/'#"!S+ T+ i{,($&|,) %&$ + I %F %&  +!1"#%! % & φ{%!g"m! +G x% d++ 4+v)\, +>+$&{''+}2o4&&nT&& n! & n& .nT'&n%&n&+C̈́i}o4'&nT(&n!&n&I(߹\n5*͌nm&nU&nUG5*:NJ%&@%)sB+'@%)?<!H5+$!9""6#"-Q%& -%%-%%-Q%&&4 -((-)&-(%$5,$%A 5d&%̈́'̈́NW+155$'`Ǎ9{H%kPDP`%!+! DH( ps(+p(H(DH((+!DH(D+%%X!%&"%{"%&"(-Ґt i :-  : \+ Jqm uva% m *R!o=)R!qU(m+*R!5>=5:&+@H5&+:†5p0 '( U(0 V ParseError 55|B00e[p &z UUU RUfillRURUwidthRU precisionRUbufR~@  'NW-8M(0 !82P# . ej V{~InvalidHexFlag5wgot581P#.InvalidNamedFlag56ygot5Y_e Vw{ EmptyFlag 50 0 [+ PYb n#Tb__self_0^u,4$4=&p|6G"""&$4!$4z:_flag4PK#,7$7c&'38H"""&$7$6x:7P'#9%&:I$&$9$9 a  :eIJ%&c'Rd% 5@  %((  VFlag5/name5value5n   [K†  / /†jM %\['$5$%, C$, % \'5%5u%k !5]&5dK, &!5Y]&5WKU^&4"%^&/K, &4"4"%4" t^&/rKp/4"& L5!!! D! !}( (+  _J&nT&n!&n&$K,5+!DH((xR! 5,@ FD nU _K55>L 5!!! D! !+ ` K&nT &n!&n&$ K, 5 +!DH("rR! 5  D . `K5h5) i{c:dL$P{ l {\ b   LLθ}2 ]V M+ +  ,+  UVMV \ D^^ ^ ^^ end_or_len^^_marker^v $  L   4" $ f d 4[L  ! (       +  [c  ԐJ  GV ͛VeVg+  K V> V` UV.V ^ PhantomDataʿF V VY_ekDefDA2f4V^VVV+V+5VgJ+ E+ JV5EVKEV1C/&^<$UGs퓧澸 + 1 ! +V ̻ԊaV}lm" +   truncated: {b(H fL$Ą h," İL$&4@ $lq 3  L  |    TY^$ 75@g 퓧澸d$ AUXR%3Ḫ\ L e(,?$K4 ot $71   hq$$ 0S?M[! ! D! |  $  5 Xa  \ b2 8 > D 2  0 - (  $ " (   $  ! 5ş)! D"ww \D(%w-w3`! $! !  + ! 4" $! d!  4!F  Q  a ! 1  ! ! `         @  a      ^  "(.4.4:/M j &nT&n!&n&=V^# f5V! ^                  ,      &]4 U)Uk&nU&nUUDD#Tw\(( &^\>$>$>&4> >d>,>$>&4> > d5:=2= > >>x=u$=$=,=DFHB ErQd?\?$?$?&4? ?JOTc%?&Ŀ? ? ??y?R$?$?#F  E ( D(N%0H E ( E(Q#?(u8::MAX F ( E(N%0H F (( F (U$C(_"0 K'  Km* U (  UUU RURURURURUR~[* * * * * *  P* P + * *   ̻ԊaP UUU RURURURURUR~[   ʿF *  *  *  *\ JTǤ '5`0 K 5+  5%`  `% 퓧澸   Placeholderposition ٖk a ۵.'I ' U )' '  K  K Jk*Ug*Th**c*P5*^*[*^U++[X K( JP K @ ArgumentspiecesRRRͰL +T formatterT _lifetimeTCountTrut4 -* 0»hhk<`7U++PPý! 5.5>Khqy"0 M'  MZ`k U ( [   x1 t1 z1  u1 P     M           '*0 M»  ۵.'I'ý)' '  M  M LUTt/ m/P f/c/U++[X L( LP LC   ^  W.34»hQ(U++PPý e 5r5  (  (N 0  (  (P  (u16::MAX  (  (N 0  ((  (S  (_"  '  K    U ( [s  q  m  6 6 6  6 P j  g  e                $     '*d j c P V »K    ۵.'I'ý)' '      U TX4 4P 44 U++[} { y  39W »&  h   U++PPý6 X  5 5  ]  "  '  M U ( [   ;  ; ;  ; P  ~ |          ;   '*{ gm»b ۵.'I'ýn )' '     UTo98P88U++[   q )( 7=n»= h   U++PPý: o  5 5  a 8 A I ir)kz)N0kt)jy)P)u32::MAXlu)n})N0nx))m|)S)_"ms'  Klr} U ) [   @ @ @  @ P     _   ) / (  $  "  '*» *0۵.'I'ýA)' ' #*" UT}>v>Po>l>U++[   DFa Z=6C»hi-U++PPýK 5X5hu"*0'  M U ) [   D D D  D P      v   @ F ?  ;  9  '* )» AG۵.'I'ý)' ' '.&$3U0TB,BP*BB(U++[ ]x qAMG»hmDU++PPý 55 ) )N# 0 ) )P = )u64::MAX  *  *N* 0  )*  *S' G )_"  '  K    U ) [   "J J $J  J P             L    '*x~»s ۵.'I'ý!)' ' UT!HHPHHU++["":"9"! FL »N -h0U++PPý^#  5 5! !*!3!;!"'  M$!$,$ U * [# # # 9N 5N ;N  6N P # # #  $   " " "  " c$ "  '*""""»" !!۵.'I'ý)' ' !U!T%,L!%LP!LL!U++[&Q&P&&  KP$»e$@hC U++PPýb' 5&56C`iq))*))*$N)0))*))*P))* u128::MAX))*))*$N)0))**))*S))*_"))'  K))) U * [D) B) >) S S S  S P ;) 8) 6)  )   j( p( i(  e( ) c(  '*5(;(4(!('(»( k'q'۵.'I'ý+)' ' d'k'c'a']'UZ'T)+QV'QPT'QQR'U++[N'L'J',,+++ PwV(*»)'h'(n&U++PPý))-* 5*5**.)***"k&q& '  M--- U * [[- Y- U- W W W  W P R- O- M-  -   , , ,  |,  . z,  '*L,R,j&8,>,»3, ++۵.'I'ý?()' ' h&o&g&e&t+Uq+T@/Um+UPk+UUi+U++[a&_&]&B)Ñ0/// TZ?.».&h&'*U++PPý (@1( 5(5((2( ))):3C3+<3K3+,N`30<3E3+;3J3+P]3z3+ usize::MAX?3H3+A3P3+,Ne30A3K3++@3O3+Sb33+_"@3F3"'  "K?3E3P3 U + [2 2 2 ]] Y] _]  Z] P 2 2 2  23   1 2 1  1 3 1  "'*11111»1 01!۵.'I!'ý5!)' !' 00000U0T4P[0I[P0B[?[0U++[00066u5t545 -Z `3»3h1hk1<20U++PPý264 5+45;4H42e4n4v4"/0$'  $MV7\7g7 U + Ф[6 6 6 ta pa va  qa P 6 6 6  I7   6 6 6  6 7  6  $'*55/55»5 55#۵.'I#'ý1#)' #' /0//5UФ5TФ8g_Ф4`_ФP4Y_ФV_4U++[/Ф//2դ0:99K9 ФD^ d7»7{0h~0@14U++PPý1ʤ:T2 5a25q2~212220 #&.'5<J ^k&v'}+L$7z$7,7aD:D\||ԧ|ܬEԶTܮĜ $-"7!2 Generate types for C-style flags with ergonomic APIs. # Getting started Add `bitflags` to your `Cargo.toml`: ```toml [dependencies.bitflags] version = "2.6.0" ``` ## 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. 2+Lza"(+.17 d7L Yield the bits of a source flags value in a set of contained flags values. Q$7 $_ ,ea W,.ܗ 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. n$  % %<%кП)+,  &T$    a%,%$7 7%%  % 0Ċ  <%\M   4t 0%%% %    #  ,%L$%($7 7%퓧澸%D  %$  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  <&˸n(*̟,T+L4%dL% !! ,&"$7 7%&   . } $$ <&%&\   4t%%&##2 5 > GG Get a flags value of any remaining bits that haven't been yielded yet.J; Once the iterator has finished, this method can be used to>? check whether or not there are any bits that didn't correspondB/ to a contained, defined, named flag remaining.2L7 7& 7%# # &%$( (( ,&)*L$'' %($7 7&퓧澸&D' ' *%$t8 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 ``` 48248:<>AD$R+-Write,U+.$z+0,a+1YGI?A.0tp Write a flags value as text. Any bits that aren't part of a contained flag will be formatted as a hex number. uL7 7%T[ 3 3  TT,A;DUT, 3h4JL\ 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. D7 7 55  ,D;DD%'466664477774y9 Write a flags value as text, ignoring any unknown bits. >7 7%T[ 9 9  T,D, 8%T }KhK;=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. 7 7 ;;  ,ƃD :%N#%^J Write only the contained, defined, named flags in a flags value as text. O7 7%T[ = =  T ,, <%T Th446$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. #|$7 7 ?? $ $,$ >%^+>@@@@>-_ Encode a value as a hex string. Implementors of this trait should not write the `0x` prefix. ,dD-AAABB-= Write the value as hex.ܫ-L-7 7[ACC -A -UT- B$-h4-.0." Parse a value from a hex string. .'D.DDDEE.T Parse the value from hex..L.7 7Գ&D /D,/ E,.|3&GHI38% An invalid hex flag was encountered.3(3&F!F4Ud4 G: f6:O A named flag that doesn't correspond to any on the flags type was encountered.6R6&F!F”6Ӕd7 H:f9!5 A hex or named flag wasn't found between separators.98T9&FF I: &K:8:777 7& 7UUU RURURURURUR~7[J :J K$: :T848az}RLNBitAnd4LPBitOr,'LQBitXor4.LRNot6LS$QLUTdLWDpDLXDzALY9 prDBik acSUFH| [[ '\]^_` 6d Define a flag. If `name` is non-empty then the flag is named, otherwise it's unnamed. i%'ZZ \% ii(h Get the name of this flag. If the flag is unnamed then the returned string will be empty. m$7 7'Z Z ]%$+ Get the flags value of this flag. 0,7 7' 7%Z Z ^%$${ Whether the flag is named. If [`Flag::name`] returns a non-empty string then this method will return `true`. D7 7'Z Z _%$ &~ Whether the flag is unnamed. If [`Flag::name`] returns a non-empty string then this method will return `false`. T 7 7'Z 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] = &[ 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() -> 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::()); ``` ,aa,<a#/*bcdefghijklmnopqrstuvwxybcdefghijklmnopqrstuvwxyz$ϭ" The set of defined flags.,aa | The underlying bits type.$aa' Get a flags value with all bits unset.*,aa d+ Get a flags value with all known bits set..aa Get the underlying bits value."@ The returned value is exactly the bits set in this flags value.C$7 7a a$. Convert from a bits value.< This method will return `None` if any unknown bits are set.?Laa gy/7 Convert from a bits value, unsetting any unknown bits.:aaz.# Convert from a bits value exactly.&aa$(C Get a flags value with the bits of a flag with the given name set.F= This method will return `None` if `name` is empty or doesn't@ correspond to any named flag.!L7 7a a j €#"' Yield a set of contained flags values.!*"S Each yielded flags value will correspond to a defined named flag. Any unknown bits"V1 will be yielded together as a final flags value."4$#7 7a #a k$#%-- Yield a set of contained named flags values.#0$W This method is like [`Flags::iter`], except only yields bits in contained named flags.$ZU Any unknown bits, or bits not corresponding to a contained flag will not be yielded.%XT%7 7܆a %a l$%&0 Whether all bits in this flags value are unset.&3D&7 7a 'a m$'Ć(4 Whether all known bits in this flags value are set.'74(7 7a (a n$(*HS Whether any set bits in a source flags value are also set in a target flags value.)VT*7 7a *a,+ o$* x,FS Whether all set bits in a source flags value are also set in a target flags value.+VD,7 7a ,a,, p$, -@6 The bitwise or (`|`) of the bits in two flags values.-94-7 7Pa .a,.$. =1@] The intersection of a source flags value with the complement of a target flags value (`&!`)./`/T This method is not equivalent to `self & !other` when `other` has unknown bits set./W< `remove` won't truncate `other`, but the `!` operator will.0?417 7Pa 1a,1$1 2@@ The bitwise exclusive-or (`^`) of the bits in two flags values.2C437 7Pa 3a,3 s$3 5J\ Call [`Flags::insert`] when `value` is `true` or [`Flags::remove`] when `value` is `false`.4_57 7Pa 5a,5 t$5 7?7*7 The bitwise and (`&`) of the bits in two flags values.6:D7 \7d7aa u Ƒ8#89D8 \8,8aa ;(9`::W@ `difference` won't truncate `other`, but the `!` operator will.;CD; \;T;aa =2SD? \?T?aa y@; A bits type that can be used as storage for a flags type. ?@$@zz ,A,@$@L@@l@AlAAlAAlA without exposing it publicly.O!\OԭP}LPtQ̭P$ The type of the underlying storage.P'LPlQ< The type of the internal field on the generated flags type.P?DQQ6Q Q Q 4QtQTQ Q Q  $Q Quse the `Flags` trait insteadQQ5DQQa,R(4+R!DRD\R,!S6DS%D܆T2'R ; An iterator over enabled flags in an instance of the type.R>$RS5V An iterator over the raw names and bits for enabled flags in an instance of the type.SYLST  T,T%LT$T%tULU&U/  U,U%X$b A marker trait that signals that an implementation of `BitFlags` came from the `bitflags!` macro.UeV` There's nothing stopping an end-user from implementing this trait, but we don't guarantee theirVcB manual implementations won't break between non-breaking releases.WEW W X 4WtWԎXĭXLXX\XX0(*88 8 8 48t8L8$9|~9599KMD::c\ 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; } } ``` Hd\|\m ] z  ] ^ ] ] ] ] ] ] ] outer,] ] $]  ] ] ] ] ] 4] ] D] ] ,] ] ]  ] ] ] ] ^ ] ] ^ ] ] ^ ] ] ^ ]  ,] ^ ,^ ^ ^ ^ ^ $^ ^ ^  ^  ^ ,^ ^ $^ ^ ^ ^ ^ ,^ ^ $^ ^  ^ ^ ^ ^ ^ t ^ ^ ^  ^^ ^ p _ ,__ _ ` ` ` ` ` ` ` ` ` ` ,`  ` ` ` 4` ` D` a ,aa a a a c a Da a a  a a b b b b  b b b b b b b  ,b b b b b $b  b  b ,b b $b b b ,b b  b c c f ,c c f Lc c Tc c unused_doc_commentsc c unused_attributesc d unused_mutTd d td d non_upper_case_globalsd d 4dd assign_op_patternd e 4ee indexing_slicinge e 4ee same_name_methode e 4ee iter_without_into_itere e ,f  f f f f f f o$ g ,gg g g g h g g 4g InternalBitFlagsg h h  h h ,hh Ĵh h h j h h h  h h h Dh i j i i j  i i i i i i i  ,i i i i i $i  i  i ,i i $i i i ,i i  j k ,kk ďk k k l k k k  k k k Dk k l k k l l l l l l l l  ,l l l l l $l  l  l ,l l $l l  l m ,mm m m m m m Dm m m  m m m n ,nn Ԋn n n n n Dn n ,nn n o o o o Do o o  o o o Do o o ,oo Do o o o o o o o č o  o p p q p p p p p p p ,p p $p  p $p p Dp p ,p p p  p p p p q p p q p p q p p q p  ,p p ,p p p q q $q q q  q  q ,q q $q q q q q ,q q $q q  q q q q q č q q q  qq q z q ,qr r r r s r Dr r r  r r s r r s  r r r r r r r  ,r r r r r $r  r  r ,s s $s s s ,s s  s s s v ,s s v Ls s Tt t t t Ғt t Tt t tt u u u 4uu ݓu u 4uu u u ,v  v v v v v v z v ,vv v v v x  v v v v v v v ,v  v v Dw w w  w w w Dw w x w w x  w w w w w w w  ,w w w w w $w  w  w ,w w $x x x ,x x  x x ,xx x x x y y Dy y ,yy ܶy y y z y Dy y y  y y y Dy z z ,zz Dz z z z z z z z č z  z z z zz z z z|' Implement functions on bitflags types.z*{[ We need to be careful about adding new methods and trait implementations here because they{^1 could conflict with items added by the end-user.{4d|||| | | 4|t| |  |   | | } | | } | ,| } $}  } } PublicBitFlagst} } ,} } }  } } } }   } ,} } } } ,} } ,}  } } } } } } } ,}  ~ $~ ~ ~ ~ bits0,~ ~ ,~ ~ $~ ~ ,~  ~ L~ ~ ~ ~ from_bits0T~ ~ ,~ ~ L~ ~ ,~  ~ ~    from_bits_truncate0  ,    ,       from_bits_retain0  ,    ,   L    from_name0T  ,  L  ,€  Ԁ D׀ ߀   is_empty0L  ,  D  ,   4    is_all0<  ,  4  ,   TŁ ρ   Ё intersects0\с ܁ ,݁   intersects1\  ,  T  ,   D  Ă   contains0L  ,   contains1L  , Ƃ Dǂ ς ,Ђ   4     insert0<  ,   insert1<  ,  4  ,   4  ΃   remove0<  ,   remove1< ȃ ,Ƀ Ѓ 4у ׃ ,؃   4     toggle0<  ,   toggle1<  ,  4  ,     ڄ  set0$  ,  „ set1$Ä DŽ ,Ȅ ̈́ τ set2$Є Ԅ ,Մ ܄ ݄  ,   d     intersection0l  ,   intersection1l  ,  d  ,  υ B,҅ ׅ   ؅ union04م ߅ ,   union14  ,  B,  ,   T  Æ   difference0\  ,   difference1\  , ņ TƆ І ,ц        symmetric_difference0  ,   symmetric_difference1  ,   ̇ ,͇  ߇ T    complement0\  ,  T  ,       ,   L  TÈ ͈ Ғψ        ,   $  t  %* ۉ ܉  4݉  ,   ,   $    ,%Š.    4  ,      $  ы  %ϯ"%%C    4  ,   $     $        ѳ,  $Í Ǎ ٍ $ڍ%%%ͱ?    4  ,   L   $      , LÏ̏ $Ώҏ  4ԏڏ 4܏  $      T  $   L%ղɐ:    4  ,    ő Α $Ƒ ʑ ̑  ͑Б $ӑ ؑ      $   %ӳʒ&    4  ,      $     $ Ó  Փ ٓ ړ  $   %F%%@%ݵ!    4    L    $     – Ŗ ,Ɩ˖ L͖֖ $ؖܖ  4ޖ 4  $   ė   T   $   L%ӗ3    4  ,   D  Ę   $Ƙ $ɘ Θ    L  $   D%7    4  ,   4     $ $     < Ț $ʚ Κ  4%V    4  ,   T     $   ,  $ $   œ Ɯ \ǜ Ӝ $՜ ٜ   \   ,   T%ǿV    4  ,   Dž ʞ ݞ  ˞ $̞ О  ,Ҟ מ $ٞߞ $  ޟ   L  $    L   ,  ȟ Dɟ%9    4 ɠ  ͠ 4Р ֠   נ ؠ $ܠ   ,  $     <  $    ڽ<   ,  ̡ 4͡%`%ܢ%W%У?    4    4  ֤    $Ť ɤ  ,ˤ Ф $Ҥ ؤ ɥ   ׾<  $    <   ,   4%إC    4   ¦ 4Ŧ ˦   ̦ ͦ $Ѧ զ  ,צ ܦ $ަ  է   <  $    <   ,   4§%J Call `insert` when `value` is `true` or `remove` when `value` is `false`.M   ƨ 4 Ԩ  ب ۨ ި   ߨ  $   ,  $  ,  $     $  $    $ ©  ,ĩ ɩ ۩ ߩ $  ,   %:    4     D  ,   d   $   ,  $ $ë ȫ ˬ ګ ޫ l߫  $    l   ,   d%ڬ9    4     D έ ,ҭ  ح B,ۭ   $   ,  $ $     4  $    4   , Ů ׮ B,خ%`%%W%ڰC    4   ʱ  D± ر ,ܱ   T   $   ,  $ $     \  $  Ʋ ʲ \˲ ײ  ,ٲ ޲  T%C    4     D  ,     ȴ $   , ´ $Ĵʴ $ʹ Ҵ      $       ,  ˵ ̵%S ܶ ݶ  4޶     D  ,   T   $ $   · Ʒ \Ƿ ӷ $շ ٷ  T 'O A macro that processed the input to `bitflags!` and shuffles attributes aroundR3 based on whether or not they're "expression-safe".6; This macro is a token-tree muncher that works on 2 levels:>S For each attribute, we explicitly match on its identifier, like `cfg` to determineV8 whether or not it should be considered expression-safe.;Q If you find yourself with an attribute that should be considered expression-safeT! and isn't, it can be added here.ֻ$d |    4t ¼  Ľ  ν Ͻ  н ѽ  ҽ  ,ӽ ؽ ,ٽ ߽    $             $    , Ԟ    $Ⱦ ̾ ξ Ӿ о  Ѿ Ծ attrs,    unprocessed\   Ϳ   ˿   ʿ   ,  ¿ ȿ ÿ $Ŀ  ɿ  ̿ ο processedL         $        $  ,    \            $         attrs_restT      L        $          ,     $        ,    \        T    L        $           $        $        $  ,    \         ,  ,     $         T      L        $          ,     $        ,    \        T    L        $        $        $  ,    \     L           $  ,     exprargsD                  $     ̙D         / Implement a flag, which may be a wildcard `_`.2d |    4t        $     named,        ,      unnamed<        <            <         $   $  ,  ,        ,      <        <            ,   T4&) Declare the user-facing bitflags struct.,[ This type is guaranteed to be a newtype with a `bitflags`-facing type as its single field.^d|   4t             ,  $       4  t  ,           ,     4  t      t   , L \  D  +? Implement functions on the public (user-facing) bitflags type.B׮^4d|   4t$            ,  $    t  ,           ,    , |            ,    t      P   ,     $        ,             $               $             $       L    $    ,      L    $   6  ,   L   $    4   4   $    $    ,   L   $    4   4   $    $    $    ,   L   $    4   4   $    ,   L   $    4   4   $        $   $        $      $   $        $   L    $   ,   L    $  6  , L $  4 4 $   $  , L $  4 4 $   $   $   , L $  4 4 $  , L $  4 4 $    D            D     4            4     T       ,        T    ,     D       ,        D    ,     4       ,        4    ,     4       ,        4    ,     4       ,        4    ,            ,  ,            ,    ,   d       ,   $        d    ,     B,       ,   $        B,    ,     T       ,   $        T    ,            ,   $            ,     T       $        T   #B׮^4d|   4t  D  !        ,   $     D   ,           t   ,   !   ! ! ! ! ! ! ! !  ,! ! ,! ! ! ! ! $! ! !  !  ! ,! ! $! ! ! ! ! ,! ! $! !  !! ! D " ,"" |" " " D  " " " " " " " ,"  " " D" " "  " " DP  " ," " " " # $# # #  # #  # # # ,## $# ## ,#  # # # # # (" # # L# # # #  # # $ ,$$ $$ $$ ,$ $ $ $  $ $ $ $ $ $ ' $ ,$$ $ % % ' % % % % % % %  ,% % % % % $%  %  % % ' % ' & :$& & & & t& & & ,&& ,& && ,& & &  & & ,& & & & $& & & & L& & L&  ' :$' '  ' ' ' ' '  ( (  ( (  ( ( $(( ( ( ( L(  ( $( ) )  ) ) )  ) ) )  ) L) ) ) $) ) , ) L) ) $)* * * * $* * * * * L** $* * +  * ,** L** $**  4*+ 4++ $+ + + $+ + + $+  $+ + ,  + ,++ L++ $++  4++ 4++ $+  , , , , $, , - $, , - $,  , $,, , , - - $- - -  - - - - $- - - $- - - $-  . L. . .  $. . 5 . . 4 . ,.. |. . . 4 . 4  $/ / / $/ / ,/ / / 3 / ,// / / / 3 0 0 0 0 0 0 0  ,0 0 0 0 0 $0  0  0 0 3 1  $11 1 ,11 L11 $11 L1 1 1 1 1 $1 1 2 41 1 ,11 L12 $22  422 422 $2 2 2 $2 2 2 2 t22 2 $2 2 $2 2 2 2 3 3 <3 3 3 3 3 4  4 4  4 4  $4 4 4 ,44 L44 $45  455 455 $5  5 D5 5 5  5 5 6  5 5 $5 5 55 5 5  5 5 5 ,55 $5 66 ,6  6 46 6 6  6 6 8 $77 7 7 7 7 $7 7 7  8  8 8 $8 8 88  8 8 $8 8 8  8 T8 8 8  8 8  ,8 8 9  8 8 $8 8 8  8  ,8 8 $8 8 89 9 9  9 9 9 ,99 $9 99 ,9  9 D9 9 9  9 9  ,9 9 :  9 9 $9 9 9  9  ,9 9 $: : ::  ,: : $: : :  : 4: : :  : :  ,: : ;  :  : : $:: : : ;  ; ; $; ; ; ; B,; ; ;  ,; ;  ; 4; ; ;  ; ;  ,; ; <  ;  ; ; $;; ; < <  < < $< < < < T< < <  ,< <  < 4< < <  < <  ,< < =  <  < < $<< < = =  = = $= = = = = = =  ,= =  = = = =  = =  ,= = ,= = ? = ,> > >  > > 4> > >  ,> >  $> > ?  > > 4> > >  ,> >  ? d? ? ?  ? ?  ,? ? @ $?? ? ? @  ? ? $? ? @  @  ,@ @ $@ @ @  @ B,@ @ @  @ @  ,@ @ A $@@ @ @ A  @ @ $@ @ @  @  ,A A $A A A  A TA A A  A A  ,A A B $AA A A B  A A $A A A  A B  ,B B $B B B  B B B B  B B  ,B B C $BB B C C  C C $C C C  C  ,C C $C C C  C TC C C  C C D $CC C C D C  C D $D D D DE(? Implement iterators on the public (user-facing) bitflags type.DBdE|EE E E 4EtE E S E F E E E E E E E ,E E $E  E E DE E ,E F F  F F F F F tF F ,FF F S F F F F F F F ,F  F $F F DF F Q.%۶F*%G%GV%H4 H H H 4H H ,H  H $H H H  H $HI I ,II $II  $I I I tI I I K  I ,II $II  $II  I I K I I tI J J ,JJ ,J JJ ,J J J tJJ J J J $J J $J J J J J tJK K K K $K K $K K K K%K0%L%^ This method is like [`iter`](#method.iter), except only yields bits in contained named flags.La%MX M M M 4M N ,N  N TN N N  N $NN N ,NN $NN  LN N N tN N N P  N ,NN $NN  LNO  O O P O O tO O O ,OO ,O OO ,O O O tOO O P P $P P $P P P P P tPP P P P $P P $P P P P Q Q Q Q Q Q Q ,Q Q $Q  Q $Q Q ,QQ LQQ $QQ $QQ dQ Q Q DQ Q S "$Q $Q R R tR R "$R IntoIterDR R R ,RR $RR  $R R R tR R R  R LR R R $RR $RR DS S S $S S $S S S ST'< Implement traits on the public (user-facing) bitflags type.S?dT|TT T T 4TtT( T  T U T T T T T T T ,T T $T  T T tT U ,UU U  U U U U U U U ,U  U $U U ,UU LUU $UU UU Binary4U U U tU U X  V V V V  V $V V  V V  V V V ,VV LVV $VV VV LV VV V ,VV LWW $WW WW 4W W X W  ,W W $W W W W W ,WW LWW $WW WW 4WW W W X  W  ,W X  X X X X X X X X ,X  X $X X ,XX LXX $XX XX Octal,X X X tX X [  Y Y Y Y  Y $Y Y  Y Y  Y Y Y ,YY LYY $YY YY LY YY Y ,YZ LZZ $ZZ ZZ 4Z Z [ Z  ,Z Z $Z Z Z Z Z ,ZZ LZZ $ZZ ZZ ,ZZ Z Z [  [  ,[ [  [ [ [ [ [ [ [ [ ,[  [ $[ [ ,[[ L[[ $[[ [[ LowerHexD[ [ [ t[ \ ^  \ \ \ \  \ $\ \  \ \  \ \ \ ,\\ L\\ $\\ \\ L\ \\ ] ,]] L]] $]] ]] 4] ] ^ ]  ,] ] $] ] ] ] ] ,]] L]] $]] ]] D]^ ^ ^ ^  ^  ,^ ^  ^ ^ ^ ^ ^ ^ ^ ^ ,^  ^ $^ ^ ,^^ L^^ $^^ ^^ UpperHexD^ ^ ^ t^ _ a  _ _ _ `  _ $_ _  _ _  _ _ _ ,__ L__ $__ __ L_ _` ` ,`` L`` $`` `` 4` ` a `  ,` ` $` ` ` ` ` ,`` L`` $`` `a Daa a a a  a  ,a a  a a a a a a a a ,a  a $a a ,aa Laa $aa  aa Ҙ,a a a tb b d "$b 4b b $b b%b9 c c c 4c  c ,c c c $c c  ,c c c tcc $c c c $c c B,c c c  ,c d d d d d d d ,d  d $d d ,dd Ldd $dd  dd BitOrAssign\d d d td d f%d9 e e e 4e  e de e e  e e $e e  ,e e $e e f $f f 4f f f  ,f f f f f f f f f ,f  f $f f ,ff Lff $ff  ff 4f g g tg g i "$g 4g g $g g%gC h h h 4h  h 4h h h $h h  ,h h $hh $h h i $h h h h h  ,h i i i i i i i ,i  i $i i ,ii Lii $ii  ii BitXorAssigndi i i ti i k%jC j j j 4j  j lj k k  k k $k k  ,k k $k k k $k k 4k k k  ,k k k k k k k k k ,k  k $k k ,kl Lll $ll  ll 4l l l tl l n "$l 4l l $l l%l: m m m 4m  m 4m m m $m m  ,m m $mm $m m n $m m dm n n  ,n n n n n n n n ,n  n $n n ,nn Lnn $nn  nn BitAndAssigndn n n tn o q%o: o o o 4o  o lo p p  p p $p p  ,p p $p p p  p $p p $pp p p p $p p $p p p p dp p p  ,p p q q q q q q q ,q  q $q q ,qq Lqq $qq  qq Subq q q tq q u "$q 4q q $r r%r`%s%sW%sC t t t 4t  t t t t $t t  ,t t $tt $t t u $u u Tu u u  ,u u u u u u u u ,u  u $u u ,uu Luu $uu  uu SubAssignLu v v tv v y %v`%w%wW%xC x x x 4x  x Tx x y  y y $y y  ,y y $y y y $y y 4y y y  ,y y y y y y y y y ,y  y $y y ,yz Lzz $zz  zz z z z tz z | "$z 4z z $z z%zS { { { 4{  {  { { { ${{ ${ { | ${ | T| | | | | | | | | | ,|  | $| | ,|| L|| $|| $|| Extend4| | | t| | } } t} } %6 The bitwise or (`|`) of the bits in each flags value.}9  } extend4} }  } } } ,}} L}~ $~~ $~~ d~ ~ $~ ~ $~ ~ ~ ~  ~ ~ $~ ~ D~ ~  ~ ~ ~   $  D   $  4   $        ,   $  , L $ $ d   t π р Հ tր  %9   L Ł  Ɓ ǁ Ɂ ,ʁρ Lсځ $܁ $ d  $  $    D     $   $ɂ ͂ ,΂ӂ LՂނ $ $ 4     4  $ ,     4  4 ƒ ˃ Dà ̃  4ރ *? Implement constants on the public (user-facing) bitflags type.Bd̄ |ʄ܄  ߄  4tڄ8             ,  $    t ΅ ,υ ԅ օ  ׅ ؅ م ܅    ؆         ,  ,     $       ,  $     , ņ $Ɔ ʆ  ن          ,   $  t      ć ,Ňʇ |̇ ۇ ܇  ݇   $   $  ,   Ɋ   ʈ   Ɉ   ,   Lj ˆ $È  Ȉ  ˈ    ,   T   ȉ  ,  $  $  $     ,  ʊ <               ,   $  ,ċ ,Ƌ ̋ Ћ tы   , ,   "8<    , $   t         ז Ќ ,ь֌ |،   Ė  Ö  $   $  ,    ͍ ,΍Ӎ Ս   ̑         ,     $     ʎ      ,   T  Տ   , $Đ  Ɛ ɐ  ʐ ,ːА LҐې $ݐ L     $   t  $  <     , ԰ ʒ ˒          ,     $        ˓ ̓  ,͓ ғ  T   Ɣ  , $    ҕ   t  ʕ ѕ ˕ ,̕  Ŗ  ؖ  "$ $        $     $       tɗ $˗ ϗ ԗ $З      $      t    tØ Ř ՘ ژ $֘ dD(/ Declare the `bitflags`-facing bitflags struct.2T This type is part of the `bitflags` crate's public API, but not part of the user's.Wd|   4tI         4    ,             4   r,  y$  L    T    $     $   \   4          %D Implement functions on the private (bitflags-facing) bitflags type.GW Methods and trait implementations can be freely added here without breaking end-users.ZS If we want to expose new functionality to `#[derive]`, this is the place to do it.Vd|    4 t Y  %       ,           t   ,               ,   ,      $         ,   $       ,   $       % $   ,   L   \     t    "$  L       "$  D       $  , L $ << <         4   <<   $     ,   $  , L $  {,             $         , L $  L "7   , L $  4    $  D       , L $ ,      {:#x}<        , $  ,  $     , L $  <    $    $  , L $  <             $         , L $  L "7   , L $  4    ,  4  L      t     $    $  , L $   FromStr<      "$    ,  4 T     D           , L $  4 4  $  $      ,  4  D   t             ,    ,   $  , L $ convert< N,             4     $          $   $  , L $ < $             $   $     $   $    $  ,    !           t   !   !    !   !   ,  ! ! ! ! $!  !  ! ,! ! $! ! ! ,! !  ! ! ,!! ! " " " " " " ,"" " " " # " " # #  # # # t# $# # # # % %L Returns a mutable reference to the raw value of the flags currently stored.#O $ $ $ 4$ $  $ bits_mutD$ $ $  $ $ $$$  $ $ $  $ $ %  $ $ $% % % %dDĺL%J Implements traits from external libraries for the internal bitflags type.Md|   4ti        ,         t  ,               ,  ,     $       ,  $         ,              t              ,     $     ,  $     , "             t              ,     $     ,  $     , !             t              ,     $     ,  $    $+d$|$$ $ $ 4$t$$ $ $  $ $ $ <$ $<$$y $ & $ & % % % ,% % %  % % % % % t% % ,% % & % % &  % % % % % % %  ,% % ,% % % % % $% % %  %  % ,& & $& & & &  && & & &-/d-|-- - - 4-t-- - -  - - - <- -\--" . / . / . . . ,. . .  . . . . . t. . ,. . / . . /  . . / . . / .  ,. / ,/ / / / / $/ / /  /  / ,/ / $/ / / /  // / / /7.d7|77 7 7 47t77 7 7  7 7 7 <7 7T77! 7 9 7 9 8 8 8 ,8 8 8  8 8 8 8 8 t8 8 ,8 8 9 8 8 9  8 8 8 8 8 8 8  ,8 8 ,8 8 8 8 8 $8 8 8  8  8 ,9 9 $9 9 9 9  99 9 9 94 An error encountered while parsing flags from text./7T0&ӯ'&7+'& t0+'}a}a}a}a &}a}a777 7& 7UUU RURURURURUR~7[0 ,0}a0t0+'ƽyL1+'+'1+'<11 1 1  1 1 1 <1 1 ,111+Pt2+'<22 2 2  2 2 2 <2 2 ,222+Pbbbb 'bb777 7' 7UUU RURURURURUR~7[0 ,0b5 A defined flags value that may be named or unnamed. :$  'θ!#$LD,L%7h7h7h7h U%7h'7h7h777 7' 7UUU RURURURURUR~7[  %,7h D(( D(; E( E(( E( F( F( F5H G7 7Գ(& G ( G G) ParseIntError,& H( H5H H7 7Գ(& I ( H I) J( J@H J7 7([ J JUP J  Jh0 K/1 L( L@H L7 7([ L LP L  Lh0 L') M( M(((;(((((7 7Գ(& )V(TQ7 7Գ(&O MK)I(GD7 7([B7- +h)VY)('$7 7(["  h?B(());)))))7 7Գ)& )l)jg7 7Գ)&e ca)_)]Z7 7)[XMC Ah?lo?)=:7 7)[864 2h0UX0).) ) ); ) * * * )  7 7Գ)&    ) * } 7 7Գ*&{  y w )u )s p 7 7)[n c Y W hU   U *S P 7 7*[N L J H hF k n F *D )**;*****7 7Գ*& )*7 7Գ*& )*7 7*[yo mhkk*if7 7*[db` ^h\\*Z* ++;+++++7 7Գ+& )+7 7Գ+& )+7 7+[ h+|7 7+[zxv thrr+p+$&.!       ::R, ;gP)p4:}ab7hJ`b 2xz$J<bTzl #FZ'known and unknown bitsa6https://github.com/bitflags/bitflags/blob/main/spec.md  Flags::bitsFlags::contains  ./example_generated/index.html Flags::intersects"specified in the source repository т  ߁ f ߁ externally defined flags o     p +    т  IterNames::remaining     Flags::iterkamacro.bitflags.html Flags::remover Flags::insert   Flag::name  ą qą      0-9a-fA-FĆ Ć zaCCDCCDaCCDCCDDAaz}CCDCCD  0K;\ ✔.,|X߭|3uBad Eݥ0 ( w}xiEb5k`aiGn) %=;epRolF,;D OhX-N\oM 6;!5T/)HP5nWDm0ȵ) 1T#\K ݕg$7wohlese[$cQɦ2_FBVrx &wPn? /#wf2aof{~ wx J+=2z'NNr-(ŨβFrU{זQ: n1O-e,u݅L:e]{BUc'Ko4Ƒ͊Ba-HLe48-VŘ\rhC7WN@BH11^ %4?OϘ]+}ގK덤9P* ܨ(w~J큚Bn͍wQm Wt28 sj=i@Muơ2^̄$S7&Oňk|u֚HNpy@A+fW1?ay:R[_N#T,[\Q-uH|qN9SIiO/`H8eJܙS4[${d;IAi胟Ԩҝ4e mj<q^@/{OZk:,3=ZS ۺe'`@Oϲ1U*E=.Ҥ05u&T ވw4Wgkџpp'{O3ɛ@hP7M偱@ۉ}ev9]E$G XA;oc3 baKC/쭣sJL?s̿aU>qu1So o^Rݩ @|蚗\_.~j%k[~SS,D)t%рIoU2) *\F+n0@Ktw 4iTbZ2=~J%#L[{jI$$$!o/, 2|/'DNᆞRt 6H)r 0uHȭ&d|L/[o LGæ5\.J:0}ThTb ,fs(W23Ta-~& +Ag-V\PAxE/\OYA ^]q#7D a 9(^]D/(!a]0Yv4\f6*4w{B\ Q1?.ѪxA'ZLGS4y'KhLYv<,=YAk&5-o@uʷ_OWʚu9POrER)"õBdUt~ZIMm9I@_ktD կt`s=lBTp\7kmyZK_F/e) 1fҥfBv֟j_xa PI.9wEJSήM54QU.p"#(/Tx9uFJ )a}3m#{۵w5x-Mx67cv_{] '%-SxSO4&I!!z9R|+:"im {PA1tuo[(L*qqLwZ3MdxXzl¶zy5bE\9VΡc]Pc`|1A ]kϨIsOؒ0ytȁnLB&G=֯ .Z pbHՍlZÊ%ӊѩKX=c!(.J+eG!s/?Үԝ:O M88^vv0@)?7ct'Tbd=Ns/:A=K~RI"Qku ` DVل{+V6e2DW~N$n/H,MMhU*'/D6]O nFft`|N P3&$!-GW@퍔!H8.~!1/\8`ӴJPKRQV䡩qGS?^Lo7SϨTs&*=O9!IiMnj=78`rBS?zDmWzQVG+q\T) ŧQ?H)`gS>U`-g8>;&F4/J< < fZ|" Q`XI/7*%6N,t[W06E\'vׅ pv`L>#d|qk2#2>ޞE`^vI`&A@} g yzWCzOX3FbIBy=v6$=@/-~dHSl5&PzNp7*}w,^i/O!9'ږS1n)rV "E<ܢ&]˖Au$$ >飰[-Htj]RfbmXx{9Ks*grY:*J.J9^/HμKƭ=W_>  8] ))3599%:m /B0n9^N 2 B 6))357891   e"#a$g%%&c'}(=))**`**+,d-..,.v../0z12.2B22234506D6X666799F:Z:n::;<==\>p>             )    ))))))))))))))))%(                   HbD &@Zt7 c  K   "@]$@+q5  U"##$%%5&&e'P))))3`44d56F77799$:D>X}\Tk\# Pv  !"!!!&"|"###$s%%%%#&'(Y) *9*j***+,{-6.O..../01L2e2222355b6{6667899x::::;&<3==flrx#'+1@ZsCR,8Rl2A;p= =L^m#%4"1GV:_9 Q    3                G V  iC z`M6Sh &!"Q#&$$1%%a&' )b)))13)4o44u66^777778899999]:e:l:s:w:~::W~͍g_m:6}<p   !6!!!:"g"B####$c$r$Q%k%%%%%% &&M'e' (g(()')?))))**3*L*d*}***I+++V,,,?-P-f---..0.I.b.z...._///l000U1f1|1122.2F2_2x22222u333444k5|55 6606D6\6u666666777889999!:2:F:Z:r::::::;;;<<=====7>H>\>p>v>|>>>>>>>>>>>>>>>?$?+?2?9?@?G?N?U?\?c?j?q?x??????????????????????@ @@@@!@'@-@3@9@?@E@K@Q@W@]@c@i@iou| %)3D^yE1"<Vr4sBr ?`l '$Ia3?  P  # 8                I  -J-^"  B""#$$%"&&a'L))))3\44`56B7d77777899999 :b:i:p:u:{::D;XzYQfY ?t    !!!""V"j"####/$e$u$X%n%%%%%%&T'k'n(().)E))))**6*Q*g****++,,B-U-i--- ..3.L.g.}....//00X1k111 2232I2b2}222223344n5556!656I6_6x666666778 9999$:7:K:_:u::::::;<< =!====:>M>a>s>y>>>>>>>>>>>>>>>??(?/?6?=?D?K?R?Y?`?g?n?u?|?????????????????????@@ @@@@$@*@0@6@<@B@H@N@T@Z@`@f@l@e56G7<Sm-N%1Ke=)Y{+H3i0-&R&K I    -  5 R  W1S:'@lUb  !"0##$%%N&'y'Z)))3j4456X7}7777789e{   !.!!!2"`"+#### $H$n$7%b%~%%%%%&&&^''Q(x((#)8)))))*+*D*[*u***7+++D,,,-L-_----.'.A.Z.q....M///Z000-1b1u1122)2=2W2p22222c333p444C5x5556+6?6S6m666666y777889Y9999.:A:U:i:::::::;; <<<=o===>D>W>k>>>> ? ?5Jd|G (B\u6EtAb )&Ki8 B  o  &  ! K  J$J|13_HU  v"###$%%E&&f'Q)))3a44l56N7g7777789 [xl   !$!!!("Y"####$2$g$(%[%t%%%%%%&&W''(q(()1)y)))) *!*:*T*k****+[++7,h,,,E-X---- . .7.P.j....@/q//M0~001[1n1112"262M2f22222V333c444'5q5556$686L6c6|66666l777y888=9999':::N:b:y::::::;;<<<=S=====>P>d>>>>??8]y ()3598] ()359Xr@*6Pj..l0-T  9) L    0  @  \6X?,EqZo !"=# $$#%%S&'_))7778k   !4!!!8"c"1###$_$=%e%%%%%%&&&a''W({();)))**1*J*^*{***=+++J,,,+-b--..*.G.`.t....S///`000A1x112,2@2]2v22222i333v444W555.6B6V6s666666777889m99 :D:X:l::::::;;; <<<===#>Z>n>Eu d  L  # A^%A,r6  V"##$%%6&& R  !$!!}"#$$&'(Z)*+,|-./0123557899;'<4==Fw e  L  $ B_&B-s7  W"##$%%7&&3R}"$$&'([)*+,}-./0123 557899;'<5==5wqpZe T  <  1N1b&  F""#$$%&&&A m"x$&&p'((J)*L++Y,,l-.b//o0012x33445678899 ;;<<$==  #BXQ[b (1:CLU^gpy $-6?H?Q@~Kl30UU 78#q$&))O--e12{5691:=G>>>>?#?_[v (6qIJJKOwU`ecf%g]ij.kkmfoowy{H7I񕰗9abg0 $5LpVogijkmnҘ!љ`;?˸ ׹c#À ]]UY (6oIJJKOuU`3aaf#gngijkmnowy{F5GИbe[i#HԮMd 7^Zu (6pIJJKOvU`8abf$ggj-kkmeoowy{G6H𕯗ј/be\i Й/$I_ ծ>Neֹ4"\o!8tə(Q߯7sϹ-xṴ hx͙,U ;wӹ1|Y̴l 570W@1     c=`G/Mybw !"E#$$&%%V&' 6#E%&( ))B+O,4--X/e0J11n3{4`5678v9:;<=,>)Nj()359M"N"M"N"****{|{|EEBB{|{|EEBB{|{|EEBB{|{|EEBB{|{|EEBB{|{|EEBBwp@ 1= !   _')3^5b7799:d  !!T"#-$V%%%R'l(,)))*O**+,S--..e../0i1 2212{22345636G6667895:I:]:::; ==K>_>'' # #%(,39=AEIPTX\go{ $+26=DKOV]dquy}18<K[cr %,8GXdp{   . = J W d n    ) 8 @ H L T \ d h p  / 6 W }   7 W ^ f  , 4 8 @ K S [ c g o w {  %*.6;?GOS[cgkow "*/3;CGOW[_cksw #'/7;CKOSY_ekqw !'-39?EKQX_fmt{#*1*)   #)D?X~] U]$001112222222222222333333333333333333366666222666666666666666666666666u@/BBChB]CC'DK93-^ LF:($ !MGA;!NH B60%"""U C=71l#bVP D>82,&$$c#] Q KEp:{J,"O p:{SBŘ p:{dL`S($crate::format_args!'ũ' fmt_internalsp:{"RL#: p:{GiŐظ 'g p:{py K'p:{0 +p:{YQ]fYVp:{ZU/p?'p:{4J)'*p:{J\9o@p:{"T p:{]?',Dp:{Wӡ0p:{[Ee{0p:{kTʂ p:{glظ #'T p:{gM€{p:{hak0ظ ' p:{Aftcp:{AW'S Mgp:{ 2,ܲ,p:{&9fa^p:{ҪYQ){}core_intrinsicsfmt_helpers_for_deriveUUp:{&Zc7z' Sp:{;AFRHNfD ~Lp:{"#vPRKp:{C pZ|/*p:{N־ %23 p:{'H p:{ca0)p:{#ظ ' p:{\ڻ{.Rup:{7M9ظ  'E p:{DEk'p:{S'3 p:{ "p:{}!D}{  UUp:{y)Np:{&U0*p:{ a߅0p:{+  p:{lNK\Zظ ' p:{*ӫظ ' p:{ȫwI-p:{yA]Wp:{hk)1*Sp:{`M-{3  UUp:{յ&J!p:{N|>p:{sSf] p:{,ظ 'U p:{@ظ ' p:{g0{F" p:{jyLJp:{g 8 "p:{s@&Op:{Z1j p:{p=j-0p:{{*xru0p:{QU 5+m D"i!D73v/C~4'#fq<3zQaG.E%]4:YPMIW4ODHT ~`|1A e48O](^]uo[_xa M 6ׅ pUf{~ w%ᆞ&HNi4e z n,!z9Ѫx%-SxS 1f+e 1T#\KI$$$p"#(*%O!o/,  ,f.Ҥn? /"?.@BH1Tn/H'33tF?O3ɛ5T`XI/7N,^igJ.J9xu9POr.J:0}T;\ W;Ϻ6< Kfu>n1D6$=@/-b @|œOYA w{B\vv0@)?y9D@N4/'DNER)ktD /)HP52DW~%(.JrBS?'ZLG,M(Q?H)D7&Og6ES=WU`-G-e,uF*grv sjc?zDmW@%рIoU&5-o@uG+q\BNNr-((Rt 6k|uhv˖Au$o/Txf pw}.~j%1$߄=^̄$SfPI.9wr>%ӊѩK덤9P[ގZJ%pyjAM5'Tbd ✔.͊BaL5&PdYAkN .-N\o M8,|XџpeD-KR6 Eݥ0$Ȁt:3b>}x ҥfB;!3Fb`*'/*bZ2$ pY:*wrx &wP!/J< J'KhL)rV l ܨ]4iTBad2|̯"im ?^L9(w~J^SFg8>;H^/y=~~& 9I@_)tŨβ)28bJSή(L/?Үo7SϨ:'ږi85܆B&F4Iu&T Q: <+}ev9G!sWNS=lBTpR|$064@" QMS:jfZ|L+=2z''tw S4y78`>;IAix,tQm{{p_2E`^ZvI`&[g&]n{PA1t*\fbms3u Wta;Iitp'{^]q#7epRolv<,= )aY ( wsv9Rj<|Eԝ:O=Ns/:u ` "P3&$!/4[${dwg)5{)E .H)rW,/ .Z 8.~!2Oؒ0yt Z3M%4?V6*4D6]O+@hP7Ԏ9uFJk:, %=; A=K~R 2#2>Y=i@Mud@A+fkM偱@ۉ0@K+Ag-*E=IBy=va 0uHȴIs  0Kc'KoJd|L/_No|qN9Ss[o LG͍wQm`ʷ_OW~ZIMm]PcBdUtBV s(W234QU.-GW@0yZK_v`L>V\'vT ]kϨ  yzWC^ɦ2_F/O!9hk`ai HμKƭzese4\f4WgkD OhXt<h7,V%hO.;F/e)Xzl¶}3m#{Gn) V6e$zNpe*qqHtj]RrsFft`|-$7wohlވwLwA@}\7*}wf g]wf2ao$!a]0Yv؃.7v_{] 'OEQ-uHqȁnL c!E$G XDVل{+#N$&MhU)3Q^Ɏ0@Oϲ19Ksu!H10ȵ)C6C-VŘ\P8^zQVAx-Mx05̿aU퉘~dHSlc7ct#L[{jF,KX=D a 9胟Ԩҝy##B&G=֯GS8k[~Sơ2eIiMnj==T) ŧC"E<m}Y\7kmSj8`ӴJP5HLNpÌ13=Zæ5\pP5S ۺe3 ba뼔qu1SoTa-D/(zy5bZÊI"Qk!O9!<>飰[-q"õ۵w54ƑKe]{H'`-M]$g™<U΄dx|qkX9VΡc߭|O4&I!OϘW蚗\_]+XJܙSvAxE/\FrU{ז*쭣s Q1A;ocJL?sKC/+:pbHՍlW1?al1nk$[#r8 6NPQV䡩q7BUITs&*=;#dWBn_݅L:G2)x J&R[ny:miEb5 ,D67cE\1/\4zOX_1^ U[$cQrhC7QXx{t`gEte|/{OZ~$'ӗA ..-mV;~|]`g)zK%M R Q$#M*{4Z9*J]`a.'tj@?)xSbGLT.y7n2Hr:PQqr:rkkW`u);kUT(@bb20(57Z,~|_w{@1]sM( ~}fQ vTM/Im SByJci9ddQQl ><4:H/l 3k:gyHTm4=xvCW;;gT"'O 29P&e j%C)o}3JI\;dNc|L) AeUy:dyvsNT!e\Vr ,s`[IUQxb>6 _Q~3P;V$&VC9$`k.s <DU:5 NCWW)USn[6)(cn- S2^7FEQq}Pu~0_Lg| L/q.KIT1 GJi9n'8g2o %dEg^rHZ2-K ..-mV;~d/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/parser.rs AA/)3TR>3@1  $$3@1  Vd_^EI'- $ "!N(@1  =S%25,! 65,! 55,! L.@1  ICL*E  UL!KX .@1  :2D5$ UH>X #2@1  C1@1  O!Q1 O&V6 "1@1  \ذEAS@4W6a/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/lib.rs l+HPTfDA?#EB@A$6%4 ;Yu 'e\be+`#_%]]od$ c* 07+ "V9   Xb,9^c.$^SFDZ # Z IgbedMb^@]- Y=6-4% MC"p~FJ 3@A$#*af$%=EKcbB 3 ^ &B 6Q  c2FU c ``2 2 / 11.  93-" K1,* !$'&&, K>31020.L020%6023)  &1.  1,* !$', .+0.23)  +_5'$ .=XR=:4TLDDDE\@T|@ ;7+;)/P-#+L`(G@1$3>/"SM.\(@3'D1%cB)*c@'(F4%&mdL4%&P4%&Z>"##GC+,F<$%mdPA)*PK34&`4) S7?W<U%*N.) .-8C 6@BE$$#' .$&% 6G'-#' .$- P> #3 &*  &*   & o l'e ,Iweb/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/iter.rs tU/"Q:]ʮx d Kj+* $cM &/"+$"XZ-8K _M#+:7  "c OCG7$+#/:3+"(,XY.]!j*?HBG  Wx;<ڣO@d/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/traits.rs z<4=JY ' .4K=C/&&V+!W-5J %,$)4#Y0#(5 +#"("/23/)9 *'H"#D58& ?6:+3KE&/2 "%J  /[9)5_]4#8!)<J=8[. 8[, 3>& Be\D& GH& Qd0   ?1;>*;e\H/<H9;X"/:  %#U7 %+%1#He#He#S1#S1%%  ?",D69C&^; ",3fdF(>}82ew= td/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/public.rs .!XuC3)].-_). dC_5.> #"53%?x.F,D%?x!#!*,(*&(&(&(*,,4%-*24<#+ C_5&81. #6E#=4h>(6%F+RF.4,%3)%E<&`*&#)"B!<VI>*K(<&H&M&W*)),D%D*E4D#8 C+6 7cAN9?DD=neY>?DD I)A3 @* HA8$E GA8$D JA8$G JA8$G G F=" MF6$ H P31 NP7$ H G3) NG7Q E mdP0' KmdP4$ E `#" ZFT'& `FW;0) C-'1. +!0!(4P! 1G/%!A8"-4@'z"#A8"-4@'e"#,?8 #q_hrFHf/Users/rvolosatovs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.6.0/src/internal.rs .Г%]v% wz%}8V`3X+7 LP+E+H[W(@1. ]\B!/ O#+ Iy%QVRFVZ-]H KyF K3_T Q& P(- J*5,* . /3 !\4 "r ?# 'w[ wasm32-wasip2Fw$n0qW-f79be0607977e26ap:{ڨ "     MM mddSrust-end-file