crypto-bigint 0.7.2

Pure Rust implementation of a big integer library which has been designed from the ground-up for use in cryptographic applications. Provides constant-time, no_std-friendly implementations of modern formulas using const generics.
Documentation
//! Limb bit and operations.

use super::Limb;
use core::ops::{BitAnd, BitAndAssign};

impl Limb {
    /// Calculates `a & b`.
    #[inline(always)]
    #[must_use]
    pub const fn bitand(self, rhs: Self) -> Self {
        Limb(self.0 & rhs.0)
    }
}

impl BitAnd for Limb {
    type Output = Limb;

    #[inline(always)]
    fn bitand(self, rhs: Self) -> Self::Output {
        self.bitand(rhs)
    }
}

impl BitAnd<&Limb> for Limb {
    type Output = Limb;

    #[inline(always)]
    fn bitand(self, rhs: &Self) -> Self::Output {
        self.bitand(*rhs)
    }
}

impl BitAndAssign for Limb {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

impl BitAndAssign<&Limb> for Limb {
    fn bitand_assign(&mut self, rhs: &Limb) {
        self.0 &= rhs.0;
    }
}