Files
boc/aamos-ledger-rust/target/debug/deps/libbitflags-795688bf52842371.rmeta
T

1016 lines
169 KiB
Plaintext
Raw Normal View History

rust
„¢#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁ‰@ AsDisplayÁL©»serdeÁŒƒÎŸ,»ŸŒßÎ arbitraryÁLûƬŸÎbytemuckÁDü»æ¤ÙÍŸ»ŸŒÍ__impl_external_bitflags_serdeÁôûŸŒ¢ÍÆL¤'»Æ¬„'ÍæDÑ'»æ¤¶'Í"__impl_external_bitflags_arbitraryÁüà("»Æ¬»(Í!__impl_external_bitflags_bytemuckÁü¥1!»æ¤1example_generatedÁŒÏ’»ñì§’testsÁ,ô’$é’íùIterÁ  innerÁ doneÁæ __private_const_newÁó  IterNamesÁflagsÁidxÁsourceÁ remainingÁæ ""­"š&&&ó IterDefinedNamesÁ**÷*ƒ..æ 111ó IterEqualNamesÁ5¥5ù5´9¥9æ  <¥<<ó parserÁ@@@@@@@ to_writerÁGG
impl WriteÁ@þJJ J @to_writer_truncateÁNNÖ@from_str_truncateÁQ@to_writer_strictÁSSÖ@from_str_strictÁVV @WriteHexÁY write_hexÁZ¨@ParseHexÁ\ parse_hexÁ@^invalid_hex_flagÁ_impl fmt::DisplayÁ^invalid_named_flagÁaé
^
empty_flagÁ@d×traitsÁffffffffff f
f f fttæ tÐ t»tis_namedÁt
is_unnamedÁfFlagsÁ{FLAGSÁ{BitsÁ{emptyÁ{£{ all_namedÁ  {
known_bitsÁ{ unknown_bitsÁ{contains_unknown_bitsÁ{´{ from_bitsÁ{from_bits_truncateÁ{from_bits_retainÁ{ from_nameÁ{ù{
iter_namesÁ{iter_defined_namesÁ{iter_equal_namesÁ{is_emptyÁ{is_allÁ{
intersectsÁ{containsÁ{truncateÁ{insertÁ{removeÁ{toggleÁ{setÁ{clearÁ{ intersectionÁ{C{
differenceÁ{symmetric_differenceÁ{
complementÁfÖ žEMPTYÁžALLÁf PrimitiveÁf impl_bitsÁf PublicFlagsÁ£ê£InternalÁfBitFlagsÁ¦ç¦àf©©ç©àf­fImplementedByBitFlagsMacroÁf __privateÁ°°°œ´´´´bitflagsÁ__impl_bitflagsÁbitflags_matchÁ__bitflags_matchÁ__bitflags_flagÁ__bitflags_expr_safe_attrsÁ__bitflags_item_safe_attrsÁ__bitflags_flag_nameÁÐ Ã__declare_public_bitflagsÁÃ__impl_public_bitflags_forwardÁÃ__impl_public_bitflagsÁÃ__impl_public_bitflags_iterÁÃ__impl_public_bitflags_opsÁÃ__impl_public_bitflags_constsÁåÊ__declare_internal_bitflagsÁÊ__impl_internal_bitflagsÁ©ÍœÍ__impl_external_bitflagsÁÍœÍÿ͹@
ParseErrorÁÓ
Óˆ@Ö×@ParseErrorKindÁØ EmptyFlagÁÙ
ØInvalidNamedFlagÁÛgotÁØInvalidHexFlagÁÝ÷@ß×fFlagÁááÐ á»fåå×fèÓèàfëÓëàfî¾
ï fñ¾
ò fô˜
õ¨f ÷˜
ø¨f
f f üÓüàf
ÿÓÿàf¾
ƒ f¾
 fˆ˜
¨f˜
Œ¨fffÓàfÓàf¾
 f¾
š fœ˜
¨fŸ˜
 ¨fff¤Ó¤àf§Ó§àfª¾
« f­¾
® f °˜
±¨f!³˜
´¨f"f#f$¸Ó¸àf%»Ó»àf&¾¾
¿ f'Á¾
 f(Ę
Ũf)ǘ
Ȩf*f+f,ÌÓÌàf-ÏÓÏàf.Ò¾
Ó f/Õ¾
Ö f0ؘ
Ù¨f1Û˜
ܨf2f3

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



Š

Œ
Ž









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


Œ

š

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

“‘, 8Æž‘8,¢‘, ¨‘8ߘ<©‘& °‘ ²‘:7<³‘8É»‘ ¿‘, Á‘8Ð $‘% Æ‘TÞ‘4â‘üè&ü¹,) Declare the user-facing bitflags struct.Áæúüê^[ This type is guaranteed to be a newtype with a `bitflags`-facing type as its single field.Á(|É}"  ì  ä , Ÿ   ¯+ ¡ ¢ ®, £8ÏÉ& ©8û
°, º8Æ»& ¾8Æ¿8, Ê8²ô& Ù8¼*æ é é
, ó ô þ+ õ ö ý, ÷8ÏÉ
ÿ, 8ÆŠ8, 8²ôt– ¤ â
 ¥, ¦8²ô8, ¹8'¿8œ'Ê8Š ×'Ø8¥% ã% êüé+üïB? Implement functions on the public (user-facing) bitflags type.Á²úü¶^àïü•4Éð(|Ê"    ú, ¥ ¦ µ+ § ¨ ´, ©8ÏÉ& ¯8û
, À8²ô& Ï8¼& Õ, ×8¥ Ø& Ù8´Ú$ Ü, Þ8Ô„ß& ï8¼*ü ÿ ˆ, 8'8í|   ¢ 8Âñ& 8$¸$ ¼8´$ Â8Ð $ È8¹
$ Ï8»% Ö, ä å ï+ æ ç î, è8ÏÉ
ð, þ8²ôtÿ& , 8¥   øP8 ¤ 8á  ¬  ­  ¯  ö 8 É  ä , Ê 8Ô„Ë 'Û 8á  â  ã 8 
8£Œ



 ×
8
 ¬
 Å
, ­
8Ô„®
'¾
8£À
 Ã
 Ä
8 ê
8´
 ñ
 ÷
 ò
8
 ù
 ­ 8$  7ˆ  8´$–  š  8 À 8Õ
 Ì  Ñ 8´  Ó  ¼8 , ï 8Ô„ð ' 8Õ
L‚   8´   ª6, ¬ 8,­ '² 8œL´ '½ 8í$¿ 'à 8³
'Ë 8¬ 'Ó 8Û  Ù  Þ 8´ *à , ã 8 'é 8œ 'ô 8í 'ú 8³
'
8¬4„
'Š
8Û


8$

 š
8´$
$ œ
,
8
'¼
8œ
'Ç
8í
'Í
8³
'Õ
8¬4×
'Ý
8©
*ä
, ç
8
'í
8œ
'ø
8í
'þ
8³
4€'8¬4ˆ'Ž8©$$ 8 Ï8å
”Ò ä é8´ ë Ã8$  ±, 8Ô„‡'8å
”™ « °8´8 Ö8þ
„Ù é î8´ ð Æ8$† Š ´, 8Ô„Œ'œ8þ
„ž ® ³8´8 Ù8 å ê8Ð  ì Õ8,‚, ˆ8Ô„‰'8L ¤ ©8Ð  « Ã6, Å8'Ë8œ'Ö8í'Ü8³
'ä8¬'ì8Û ò ÷8´*ù, ü8'8œL„'8í$'8³
4•'8¬4'£8Û © ´8 ® ³8´$ µ, Ï8'Õ8œL×'à8í'æ8³
'î8¬'ö8©*ý, 8,'8œLˆ'8í$“'8³
4™'Ÿ8¬'§8©$ ­8 è8í ó ù ô8 û ³8$‘ 7ˆ  8í   ¡8 Æ8ü Ï Õ Ð8 × 8 ñ7ˆ ò ó8ü ú û8  8 ­ º ®8$ ³8¹
 ¼ ý8 Ö7ˆ × Ø8 ã ë8¹
 é7ˆ ê8 8šD“  ¨ œ8$$ ¡8¹
 ª é8 Ä7ˆ Å Æ8š Ï ×8¹
 Õ7ˆ Ö8 ü8¸4ÿ   88$$ 8¹
,‘ ˜ Õ8 ²7ˆ ³ ´8¸ » Ã8¹
 Á7ˆ Â8 è8Å ñ  ò8ó8$ û8¹
  Á8 ž7ˆ Ÿ  8Å § ¯8¹
 ­7ˆ ®8 Ô8Ò Ý î Þ8ß8$ ç8¹
 ð ­8$† Š7ˆ  Œ8Ò4  8¹
,” 7ˆ š8 À8ßÃ Æ Þ Ç8È8$ Ð8¹
$ ×8» à ¡8 ú7ˆ û ü8ßý  8¹
, 7ˆ $ ˆ8»8 ´8õ Ã Ï8$ È8¹
 Ñ š8 ë ˆ8 ð7ˆ ñ ò8õ ÿ 8¹
,€ 7ˆ 8 ­8C µ Á8$ º8¹
 Ã 8 Ý ó8 â7ˆ ã ä8C ê ò8¹