/rust/registry/src/index.crates.io-1949cf8c6b5b557f/fastnum-0.7.4/src/bint/bits.rs
Line | Count | Source |
1 | | macro_rules! bits_impl { |
2 | | ($Ty: ident, $sign: ident) => { |
3 | | impl<const N: usize> $Ty<N> { |
4 | | #[doc = doc::bits::bitand!($sign 256)] |
5 | | #[must_use = doc::must_use_op!()] |
6 | | #[inline(always)] |
7 | 0 | pub const fn bitand(self, rhs: Self) -> Self { |
8 | 0 | Self(self.0.bitand(rhs.0)) |
9 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::bitand Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::bitand |
10 | | |
11 | | #[doc = doc::bits::bitor!($sign 256)] |
12 | | #[must_use = doc::must_use_op!()] |
13 | | #[inline(always)] |
14 | 0 | pub const fn bitor(self, rhs: Self) -> Self { |
15 | 0 | Self(self.0.bitor(rhs.0)) |
16 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::bitor Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::bitor |
17 | | |
18 | | #[doc = doc::bits::bitxor!($sign 256)] |
19 | | #[must_use = doc::must_use_op!()] |
20 | | #[inline(always)] |
21 | 0 | pub const fn bitxor(self, rhs: Self) -> Self { |
22 | 0 | Self(self.0.bitxor(rhs.0)) |
23 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::bitxor Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::bitxor |
24 | | |
25 | | #[doc = doc::bits::not!($sign 256)] |
26 | | #[must_use = doc::must_use_op!()] |
27 | | #[inline(always)] |
28 | 0 | pub const fn not(self) -> Self { |
29 | 0 | Self(self.0.not()) |
30 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::not Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::not |
31 | | } |
32 | | }; |
33 | | } |
34 | | |
35 | | pub(crate) use bits_impl; |