mod impls;
#[cfg(test)]
mod tests;
#[doc = crate::_tags!(num namespace)]
#[doc = crate::_doc_location!("num/fin")]
#[must_use]
#[repr(transparent)]
pub struct Bitwise<T>(pub T);
#[rustfmt::skip]
mod core_impls {
use crate::{impl_trait, Bitwise, Hash, Hasher, Ordering};
impl<T: Clone> Clone for Bitwise<T> { fn clone(&self) -> Self { Self(self.0.clone()) } }
impl<T: Copy> Copy for Bitwise<T> {}
impl_trait![fmt::Debug for Bitwise[T][T] where T |self, f|
f.debug_tuple("Bitwise").field(&self.0).finish()
];
impl_trait![fmt::Display for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::Binary for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::Octal for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::LowerHex for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::UpperHex for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::LowerExp for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl_trait![fmt::UpperExp for Bitwise[T][T] where T |self, f| self.0.fmt(f)];
impl<T: PartialEq> PartialEq for Bitwise<T> {
fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) }
}
impl<T: Eq> Eq for Bitwise<T> {}
impl<T: PartialOrd> PartialOrd for Bitwise<T> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { self.0.partial_cmp(&other.0) }
}
impl<T: Ord> Ord for Bitwise<T> {
fn cmp(&self, other: &Self) -> Ordering { self.0.cmp(&other.0) }
}
impl<T: Hash> Hash for Bitwise<T> {
fn hash<H: Hasher>(&self, state: &mut H) { self.0.hash(state); }
}
impl<T: Hasher> Hasher for Bitwise<T> {
fn finish(&self) -> u64 { self.0.finish() }
fn write(&mut self, bytes: &[u8]) { self.0.write(bytes); }
}
}