Lines Matching defs:set
14 //! The `bitflags!` macro generates `struct`s that manage a set of flags. The
37 //! assert_eq!((e1 - e2), Flags::A); // set difference
38 //! assert_eq!(!e2, Flags::A); // set complement
155 //! - `Sub` and `SubAssign`: set difference
156 //! - `Not`: set complement
162 //! - `empty`: an empty set of flags
163 //! - `all`: the set of all defined flags
174 //! - `is_all`: `true` if currently set flags exactly equal all defined flags
181 //! - `set`: inserts or removes the specified flags depending on the passed value
182 //! - `intersection`: returns a new set of flags, containing only the flags present
184 //! - `union`: returns a new set of flags, containing any flags present in
186 //! - `difference`: returns a new set of flags, containing all flags present in
189 //! - `symmetric_difference`: returns a new set of flags, containing all flags
192 //! - `complement`: returns a new set of flags, containing all flags which are
193 //! not set in `self`, but which are allowed for this type.
307 /// assert_eq!((e1 - e2), Flags::A); // set difference
308 /// assert_eq!(!e2, Flags::A); // set complement
524 /// Returns an empty set of flags.
530 /// Returns the set containing all flags.
589 /// Returns `true` if all flags are currently set.
627 pub fn set(&mut self, other: Self, value: bool) {
638 /// Specifically, the returned set contains only the flags which are
653 /// Specifically, the returned set contains all flags which are
670 /// Specifically, the returned set contains all flags present in
689 /// Specifically, the returned set contains the flags present which
705 /// Returns the complement of this set of flags.
707 /// Specifically, the returned set contains all the flags which are
708 /// not set in `self`, but which are allowed for this type.
710 /// Alternatively, it can be thought of as the set difference
737 /// Adds the set of flags.
755 /// Toggles the set of flags.
773 /// Disables all flags disabled in the set.
783 /// Returns the set difference of the two sets of flags.
791 /// Disables all flags enabled in the set.
801 /// Returns the complement of this set of flags.
1158 assert_eq!((e1 - e2), Flags::A); // set difference
1159 assert_eq!(!e2, Flags::A); // set complement
1177 assert_eq!((e1 - e2), (Flags::A | extra)); // set difference
1178 assert_eq!(!e2, Flags::A); // set complement
1179 assert_eq!(!e1, Flags::B); // set complement
1327 // Check that the named set operations are equivalent to the
1371 e1.set(Flags::B, true);
1372 e1.set(Flags::C, false);
1387 // set difference