Skip to main content

crypto_bigint/limb/
bit_and.rs

1//! Limb bit and operations.
2
3use super::Limb;
4use core::ops::BitAnd;
5
6impl Limb {
7    /// Calculates `a & b`.
8    pub const fn bitand(self, rhs: Self) -> Self {
9        Limb(self.0 & rhs.0)
10    }
11}
12
13impl BitAnd for Limb {
14    type Output = Limb;
15
16    fn bitand(self, rhs: Self) -> Self::Output {
17        self.bitand(rhs)
18    }
19}