use core::fmt;
use core::fmt::Debug;
pub type BidUint32 = u32;
pub type BidUint64 = u64;
#[repr(C, align(16))]
#[derive(Default, Copy, Clone, PartialEq, Eq)]
pub struct BidUint128 {
pub w: [BidUint64; 2],
}
impl Debug for BidUint128 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[{:016X} {:016X}]", self.w[1], self.w[0])
}
}
#[repr(C, align(16))]
#[derive(Default, Copy, Clone, PartialEq, Eq)]
pub struct BidUint192 {
pub w: [BidUint64; 3],
}
impl Debug for BidUint192 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[{:016X} {:016X} {:016X}]", self.w[2], self.w[1], self.w[0])
}
}
#[repr(C, align(16))]
#[derive(Default, Copy, Clone, PartialEq, Eq)]
pub struct BidUint256 {
pub w: [BidUint64; 4],
}
impl Debug for BidUint256 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[{:016X} {:016X} {:016X} {:016X}]", self.w[3], self.w[2], self.w[1], self.w[0])
}
}
#[repr(C, align(16))]
#[derive(Default, Copy, Clone, PartialEq, Eq)]
pub struct BidUint384 {
pub w: [BidUint64; 6],
}
impl Debug for BidUint384 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[{:016X} {:016X} {:016X} {:016X} {:016X} {:016X}]", self.w[5], self.w[4], self.w[3], self.w[2], self.w[1], self.w[0])
}
}
#[repr(C, align(16))]
#[derive(Default, Copy, Clone, PartialEq, Eq)]
pub struct BidUint512 {
pub w: [BidUint64; 8],
}
impl Debug for BidUint512 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[{:016X} {:016X} {:016X} {:016X} {:016X} {:016X} {:016X} {:016X}]", self.w[7], self.w[6], self.w[5], self.w[4], self.w[3], self.w[2], self.w[1], self.w[0])
}
}