autocommit 2022-01-09 16:13:56 CET
This commit is contained in:
parent
928f94daa6
commit
b08bd94353
13 changed files with 151 additions and 28 deletions
|
|
@ -159,5 +159,15 @@ macro_rules! bitor {
|
|||
Self(self.0 | rhs.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl $name {
|
||||
pub fn contains(self, rhs: Self) -> bool {
|
||||
self.0 & rhs.0 == rhs.0
|
||||
}
|
||||
|
||||
pub fn is_some(self) -> bool {
|
||||
self.0 != 0
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue