Skip to content

Commit

Permalink
updated readme #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas3674 committed Aug 12, 2023
1 parent 383e304 commit 11a9696
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,15 @@ If you need / can think of any other config option, feel free to suggest them an
const fn bits(&self) -> #type;
// Returns a bitmask that contains all values.
//
// This will include bits that do not have any flags.
// Use `::full()` if you only want to use flags.
const fn all() -> Self;
// Returns `true` if the bitmask contains all values.
//
// This will check for `bits == !0`,
// use `.is_full()` if you only want to check for all flags
const fn is_all(&self) -> bool;
// Returns a bitmask that does not contain any values.
Expand All @@ -136,6 +142,18 @@ const fn none() -> Self;
// Returns `true` if the bitmask does not contain any values.
const fn is_none(&self) -> bool;
// Returns a bitmask that contains all flags.
const fn full() -> Self;
// Returns `true` if the bitmask contains all flags.
//
// This will fail if any unused bit is set,
// consider using `.truncate()` first.
const fn is_full(&self) -> bool;
// Returns a bitmask that only has bits corresponding to flags
const fn truncate(&self) -> Self;
// Returns `true` if `self` intersects with any value in `other`,
// or if `other` does not contain any values.
// This is equivalent to `(self & other) != 0 || other == 0`.
Expand Down

0 comments on commit 11a9696

Please sign in to comment.