crypto_bigint/limb/
bit_and.rs1use super::Limb;
4use core::ops::{BitAnd, BitAndAssign};
5
6impl Limb {
7 #[inline(always)]
9 pub const fn bitand(self, rhs: Self) -> Self {
10 Limb(self.0 & rhs.0)
11 }
12}
13
14impl BitAnd for Limb {
15 type Output = Limb;
16
17 #[inline(always)]
18 fn bitand(self, rhs: Self) -> Self::Output {
19 self.bitand(rhs)
20 }
21}
22
23impl BitAndAssign for Limb {
24 fn bitand_assign(&mut self, rhs: Self) {
25 self.0 &= rhs.0;
26 }
27}
28
29impl BitAndAssign<&Limb> for Limb {
30 fn bitand_assign(&mut self, rhs: &Limb) {
31 self.0 &= rhs.0;
32 }
33}