rust#rustc 1.72.0 (5680fa18f 2023-08-23)ՆQ4-46a989d0e2cef827e$ɛDp>-b114db70ea0690b1rustc_std_workspace_core ūu sR-13da980d6c74fec5Uexample_generated%tests  _corebitflags__impl_all_bitflags__impl_bitflagsHV\dL A typesafe bitmask flag generator useful for sets of C-style bitmask flags.O= It can be used for creating typesafe wrappers around C APIs.@J The `bitflags!` macro generates `struct`s that manage a set of flags. TheMJ flags should only be defined for integer types, otherwise unexpected typeM" errors may occur at compile time.% # Example  ``` use bitflags::bitflags; bitflags! { struct Flags: u32 { const A = 0b00000001;! const B = 0b00000010;! const C = 0b00000100;!@ const ABC = Self::A.bits | Self::B.bits | Self::C.bits;C }  } fn main() {" let e1 = Flags::A | Flags::C;%" let e2 = Flags::B | Flags::C; %2 assert_eq!((e1 | e2), Flags::ABC); // union 59 assert_eq!((e1 & e2), Flags::C); // intersection <; assert_eq!((e1 - e2), Flags::A); // set difference >; assert_eq!(!e2, Flags::A); // set complement >    b See [`example_generated::Flags`](./example_generated/struct.Flags.html) for documentation of code e. generated by the above `bitflags!` expansion. 1 A The generated `struct`s can also be extended with type and trait D implementations:    use std::fmt;       ! !    impl Flags { pub fn clear(&mut self) {!L self.bits = 0; // The `bits` field can be accessed from within theOP // same module where the `bitflags!` macro was invoked.S    impl fmt::Display for Flags {!; fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {> write!(f, "hi!")    ) let mut flags = Flags::A | Flags::B;, flags.clear(); assert!(flags.is_empty());"- assert_eq!(format!("{}", flags), "hi!");0? assert_eq!(format!("{:?}", Flags::A | Flags::B), "A | B");B0 assert_eq!(format!("{:?}", Flags::B), "B");3  # VisibilityK The generated structs and their associated flag constants are not exportedNJ out of the current module by default. A definition can be exported out ofM4 the current module by adding `pub` before `struct`:7 mod example { use bitflags::bitflags; bitflags! {! pub struct Flags1: u32 {$" const A = 0b00000001;% }  # pub struct Flags2: u32 { " const B = 0b00000010;%     $ let flag1 = example::Flags1::A;'C let flag2 = example::Flags2::B; // error: const `B` is privateF  # AttributesF Attributes can be attached to the generated `struct`s by placing themI before the `struct` keyword.  ## RepresentationsO It's valid to add a `#[repr(C)]` or `#[repr(transparent)]` attribute to a typeRR generated by `bitflags!`. In these cases, the type is guaranteed to be a newtype.U #[repr(transparent)] ! ! !    # Trait implementationsG The `Copy`, `Clone`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash`JQ traits are automatically derived for the `struct`s using the `derive` attribute.TC Additional traits can be derived by providing an explicit `derive`F attribute on `struct`.  J The `Extend` and `FromIterator` traits are implemented for the `struct`s, MM too: `Extend` adds the union of the instances of the `struct` iterated over, P+ while `FromIterator` calculates the union.!.!J The `Binary`, `Debug`, `LowerHex`, `Octal` and `UpperHex` traits are also!MA implemented by displaying the bits value of the internal struct."D# ## Operators##K The following operator traits are implemented for the generated `struct`s:#N## - `BitOr` and `BitOrAssign`: union#&, - `BitAnd` and `BitAndAssign`: intersection$/& - `BitXor` and `BitXorAssign`: toggle$)( - `Sub` and `SubAssign`: set difference$+ - `Not`: set complement%% # Methods% %? The following methods are defined for the generated `struct`s:%B&! - `empty`: an empty set of flags&$& - `all`: the set of all defined flags&)6 - `bits`: the raw value of the flags currently stored&9G - `from_bits`: convert from underlying bit representation, unless that'JH representation contains bits that do not correspond to a'K defined flag(M - `from_bits_truncate`: convert from underlying bit representation, dropping(PI any bits that do not correspond to defined flags)LM - `from_bits_unchecked`: convert from underlying bit representation, keeping)PK all bits (even those not corresponding to defined*N flags)+#6 - `is_empty`: `true` if no flags are currently stored+9J - `is_all`: `true` if currently set flags exactly equal all defined flags+ML - `intersects`: `true` if there are flags common to both `self` and `other`,OP - `contains`: `true` if all of the flags in `other` are contained within `self`-S1 - `insert`: inserts the specified flags in-place-41 - `remove`: removes the specified flags in-place.4M - `toggle`: the specified flags will be inserted if not present, and removed.P if they are./N - `set`: inserts or removes the specified flags depending on the passed value/QP - `intersection`: returns a new set of flags, containing only the flags present0SM in both `self` and `other` (the argument to the function).0PG - `union`: returns a new set of flags, containing any flags present in1JD either `self` or `other` (the argument to the function).2GL - `difference`: returns a new set of flags, containing all flags present in2OH `self` without any of the flags present in `other` (the3K+ argument to the function).3.K - `symmetric_difference`: returns a new set of flags, containing all flags4NL present in either `self` or `other` (the argument4O: to the function), but not both.5=K - `complement`: returns a new set of flags, containing all flags which are5NH not set in `self`, but which are allowed for this type.6K7 ## Default77P The `Default` trait is not automatically implemented for the generated structs.7S7T If your default value is equal to `0` (which is the same value as calling `empty()`8W; on the generated struct), you can simply derive `Default`:8>99999- // Results in default value with bits: 090 #[derive(Default)]:: :! :! :! ;  ;; ;5 let derived_default: Flags = Default::default();;8+ assert_eq!(derived_default.bits(), 0);;. <<<T If your default value is not equal to `0` you need to implement `Default` yourself:! >! >  >>% // explicit `Default` implementation>( impl Default for Flags {? fn default() -> Flags {? Flags::A | Flags::C? ?  ?? @9 let implemented_default: Flags = Default::default();@<< assert_eq!(implemented_default, (Flags::A | Flags::C));@? AAA # Zero FlagsAA^ Flags with a value equal to zero will have some strange behavior that one should be aware of.AaBBBBBB! const NONE = 0b00000000;B$! const SOME = 0b00000001;C$ C  CC C let empty = Flags::empty();C# let none = Flags::NONE;D let some = Flags::SOME;DD0 // Zero flags are treated as always presentD3* assert!(empty.contains(Flags::NONE));D-) assert!(none.contains(Flags::NONE));E,) assert!(some.contains(Flags::NONE));E,F= // Zero flags will be ignored when testing for emptinessF@ assert!(none.is_empty());F! FFFC Users should generally avoid defining a flag with a value of zero.FFGGGGGGH G Ghttps://docs.rs/bitflags/1.3.2G G9HV\dHHV0 The macro used to generate the flag structures.H3IO See the [crate level docs](../bitflags/index.html) for complete documentation.IRII IIIJJJ J! J! K! KC K  KK L L% L% L5 M< M> N> NNNNDOOOOOOOOP P! P! P  PPQQ!QORS R  RRR!S>S S  SS ST,TT"T0UBU3 VVV V VV VV#VV\VXVVWVVWV outerVV W WW  WW  W WW BitFlagsWW WWW WW  WWXWWXWWWWWWW innerWW WWWWW WW  W W W XX FlagXX XXX valueXX XX XXXXX tXX  X XXX[XXXXXXX \X XXYY YYY mYY Y Y }YY iYY Y Y YY YY  Y YY ]YYY bitsYYY YY Z ZZ[Z ]ZZZ ZZ[ZZ[ ZZZZZZZ ^ZZZZZ Z Z Z[ `[[[ `[[ [ [ [[[[[[[ a[ [[[\\\\\\ \ \ \\ \\#\\\\ \\\]c]^ ] ]]] ]]] ]]  ]]^]]^ ]]]]]]] ]] ]]]]] ]]  ] ] ]^ `^^ ^^^ `^^ ^^ ^^^b___ ___ non_snake_case_  _ __BitFlags_ _`__` __ `___ __ __ ```` ``` m` ` n` `` ]``b``b ` aabaaa aaa a aaaaaaaa aaaaa a a a aa `aab bb bbb `bb dbb b bbb dbbbbbb b b nb bbb `b b bccc c ]cc ccc cc  cccccc ccc dcc ccdc c cc cc#ccdd dcddde d ]dd ddd dd  ddedde ddedded dd deeee ee  e e ee `ee eee `ee ee eee ee ee ee ee pf ff ]ffy  f fff f ff ff f ff ff ff ff f ff ff ff ff ffy0jjj jjj mj  j nj jkjjk kkk k  kk `kkk k kk kkk  k kllm llm mm m nm mm ]mmrmmr m mnrnnn nnn n nnn nnnonnnon noooo o o o  oo `ooo o oo ooq o ooo `oo doo oo pp dpp ppp  p  ppq qq dq q qqq `qq dqq qqq `qq dq r r r firstrr !rrrru ss s s ns sss `sss ssu s s ؉sst ss  s st | stt ؉tt  tt tt  t tut tt tt  t  uuuu `uuu u u extra_bitsu u uu du u u uu uuuu duuuu v v v vvx v v ؉vvw vv  v vvvvv ؉ww  ww ww  w ww0xwwww ww ww ww LowerHexww xxx x x x xxx x ؉xxy xx  x xx(empty)x xx yyyyy yy yy yy yy Binaryy yy ]yy{  y yyz y yz zz z zz zz zz zz z zz zz zz zz zz{ z zz zz zz zz zz{ z zz d{{ { {{ {{ {{ {{ Octal{ {{ ]{{}  { {{| { {{ {{ { {{ {| || || | || || || || ||} | || || || || ||| | || d|| | }} }} }} }} } }} ]}}  } }}~ } }} }} } }} }} }} }} } ~~ ~~ ~~ ~~ ~~~ ~ ~~ ~~ ~~ ~~ ~~~ ~ ~~ d~~ ~     UpperHex  ]                      €ʀ ̀π݀ Ѐ рՀ dրڀ ܀    ] ́́΁ρ߁Ё сցׁ݁؁ ف ށ    `   d ` # Returns an empty set of flags."      empty σ  d #& Returns the set containing all flags.ރ)       ńۆ ׄ ͆ ]  Ʌʅ݅˅̅܅ͅ ΅ӅԅڅՅ օ ۅ ޅ ` ` #5 Returns the raw value of the flags currently stored.8  Ň ɇ  χ d҇և܇ ׇ ؇އ   d#8 Convert from underlying bit representation, unless that;#? representation contains bits that do not correspond to a flag.B  ȉ ̉  ҉ from_bitsՉ މ d߉        d     dŠ ŊNJ ݊ ފ      d    Ë ŋʋ ̋ҋ ԋڋ ܋#> Convert from underlying bit representation, dropping any bitsA#! that do not correspond to flags.܌$      from_bits_truncateˍ dÍǍɍ ʍ͍ ЍՍ  d d    d#; Convert from underlying bit representation, preserving all>#7 bits (even those not corresponding to a defined flag).:## # Safetyˏ ##: The caller of the `bitflags!` macro can chose to allow or=#- disallow extra bits for their bitflags type.0##9 The caller of `from_bits_unchecked()` has to ensure that<#9 all bits correspond to a defined flag or that extra bitsԑ<#" are valid for this bitflags type.%ϒВג ђ   #   from_bits_unchecked d  ˓  d#1 Returns `true` if no flags are currently stored.ړ4      is_emptyƔ̔ ǔ ȔΔ є֔  d  خ d#/ Returns `true` if all flags are currently set.2      is_all      d – ĖȖ dɖΖ іՖ d֖#E Returns `true` if there are flags common to both `self` and `other`.H˗̗ӗ ͗     intersects       ͘ ̘ d  d  ˜ǘ dȘΘ Ϙטؘ#K Returns `true` if all of the flags in `other` are contained within `self`.NЙљؙ ҙ     contains     ݚ  d   dÚ ƚ˚ d̚#& Inserts the specified flags in-place.)     insertśܛ ƛ Ǜ ˛ϛ ћ֛ ؛ޛ  d   d#& Removes the specified flags in-place.)ڜۜ ܜ    remove     Ν  d    d#& Toggles the specified flags in-place.ݝ)     toggle͞    žǞ ɞϞ  d   d#F Inserts or removes the specified flags depending on the passed value.I     set      ` ա à `Ơ̠     ǡ   #9 Returns the intersection between the flags in `self` and<# `other`. #Ƣ#A Specifically, the returned set contains only the flags which are֢D#( present in *both* `self` *and* `other`.+#ߣ#3 This is equivalent to using the `&` operator (e.g.6#) [`ops::BitAnd`]), as in `flags & other`.,##E [`ops::BitAnd`]: https://doc.rust-lang.org/std/ops/trait.BitAnd.htmlHХѥإ ҥ      intersection      Ŧʦ d̦Ц Ҧ֦ dצ ܦ ަ d#> Returns the union of between the flags in `self` and `other`.A#ԧ#< Specifically, the returned set contains all flags which are?#A present in *either* `self` *or* `other`, including any which areD#< present in both (see [`Self::symmetric_difference`] if that?# is undesirable).ͩ##3 This is equivalent to using the `|` operator (e.g.6#( [`ops::BitOr`]), as in `flags | other`.+##C [`ops::BitOr`]: https://doc.rust-lang.org/std/ops/trait.BitOr.htmlFܫݫ ޫ      ?     ʬϬ dѬլ ׬۬ dܬ   d#@ Returns the difference between the flags in `self` and `other`.C#ۭ#= Specifically, the returned set contains all flags present in@#0 `self`, except for the ones present in `other`.3##A It is also conceptually equivalent to the "bit-clear" operation:D#6 `flags & !other` (and this syntax is also supported).ٯ9##3 This is equivalent to using the `-` operator (e.g.6#& [`ops::Sub`]), as in `flags - other`.)##? [`ops::Sub`]: https://doc.rust-lang.org/std/ops/trait.Sub.htmlB       difference² ̲޲ ͲѲ Ӳز ڲ   d  d    d#? Returns the [symmetric difference][sym-diff] between the flagsB# in `self` and `other`.##@ Specifically, the returned set contains the flags present which´C#> are present in `self` or `other`, but that are not present inA#> both. Equivalently, it contains the flags present in *exactlyA#% one* of the sets `self` and `other`.(##3 This is equivalent to using the `^` operator (e.g.6#) [`ops::BitXor`]), as in `flags ^ other`.,##? [sym-diff]: https://en.wikipedia.org/wiki/Symmetric_differenceB#E [`ops::BitXor`]: https://doc.rust-lang.org/std/ops/trait.BitXor.htmlθH ù  ѹ չ  ۹ symmetric_difference޹    Һ ĺ d  d   d#- Returns the complement of this set of flags.0##@ Specifically, the returned set contains all the flags which areC#8 not set in `self`, but which are allowed for this type.;#Ƽ#: Alternatively, it can be thought of as the set differenceּ=#? between [`Self::all()`] and `self` (e.g. `Self::all() - self`)B##3 This is equivalent to using the `!` operator (e.g.6# [`ops::Not`]), as in `!flags`.¾"## [`Self::all()`]: Self::all#? [`ops::Not`]: https://doc.rust-lang.org/std/ops/trait.Not.htmlB       complement        d     BitOr  ] "  #, Returns the union of the two sets of flags./       ]   d  d   d     BitOrAssign  ]# Adds the set of flags.            d   d     BitXor  ] "  #> Returns the left flags, but with all the right flags toggled.A          d  d   d     BitXorAssign  ]# Toggles the set of flags.            d   d     BitAnd  ] "  #8 Returns the intersection between the two sets of flags.;          d  d   d     BitAndAssign  ]#( Disables all flags disabled in the set.+            d   d     Sub  ] "  #5 Returns the set difference of the two sets of flags.8           d  d    d     SubAssign  ]#' Disables all flags enabled in the set.*             d    d     Not  ] "  #0        d   d        Extend ]  ]   extend       Item      iterator               ]  ]                      خ        filtered    cfgargs    rest  restargs                                 nextargs                                                                                                                               %./example_generated/struct.Flags.html../bitflags/index.html+/ -.MRR+/ -U2LȾu+/ -/f7+/ -FJdI+/ -td^_Z+/ -R)+/ -Դb֥+/ -Q ̖)V .*Be4;)%%%)-4<N****(*_4;***"*-4<)-4<+/ -'R$kЬݴʹODHT +/ -FJdI+/ -/f7+/ -Դb֥+/ -R)+/ -U2LȾu+/ -Q ̖+/ -.MRR+/ -td^_ZAsB:TvRAsB:TvR\/home/steffen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-1.3.2/src/lib.rs wĹ(m OLTX?1""" 9/X""" ) =@b%% $ 4.--A"G : 4S"""D &&6=??E"" "PT "? -#1C4$111  E  ,$  3$#!0+ AP)#":N*)0+1&56M*)U"&;$1'HB% -#(H- 8a? 7a> :aA :aA '?/+!6)'$3,E-HOV7G8N1@7KGJ=II2HA34?1:UBC[@764)64*64)V>((IQ8C9UC6NLQL!C8S<6PM@QFC6OA7O'PNN5C9OUK6=PHJOC/+O45 7 <76 ='6) 8 N36 >*7) 8 H36 >87) 5 E07 ;74* 5 =#8 Da'& Ja0) INNQ7*95'('!.  ) *. ")  INNQ7*95&(&!.  ) *. ")  & 3#T9'"Y""!&+D  !!5 '(  / !  713=C< ?;?LGA9' LN $CNJK9" ;% ; H@*  ,')>1/ (%&C"/0;-/ -!!%^ 3!% $% '&$ &#"*\D &149 *&"644 &&49;5<-1/4 $C.&>9E55D5 +++$$$222--.--+..2330011*/KK N9F7E9N)09+W "C8+%8391//X #IK#I; ('(''''(' ]% 3)G)P%%5,%54%5*&5K*&5M'V'4/4[K[L'Y''2//2  * !- %%&""( +$"$"  *+ <0<0>' KE G  $$'$! $$#""""%* $$(( 6 C@DA4C1% E 8;FDG BEJKN @CIJM @CIJM)& %  +  %&&&  ' ,4 (<  .# 1 L/5'2I.7# ' ! "" 74)=:  $EEEH LQQQ 6 777G )3A1 +X66 )3o38! 0ȫѣ#]]0x86_64-unknown-linux-gnu$1E$IkO-1926cec1a16924e0+/ -@@   U