use crate::signals::utils::{apply1, apply2}; use crate::signals::Signal; impl core::ops::Not for &Signal { type Output = Signal; fn not(self) -> Self::Output { apply1(self, |v| !v) } } impl core::ops::BitAnd for &Signal { type Output = Signal; fn bitand(self, other: Self) -> Self::Output { apply2(self, other, |lhs, rhs| lhs && rhs) } } impl core::ops::BitOr for &Signal { type Output = Signal; fn bitor(self, other: Self) -> Self::Output { apply2(self, other, |lhs, rhs| lhs || rhs) } }