use core::ffi::c_int;
use core::fmt;
#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct Column {
raw: c_int,
}
impl Column {
pub const FIRST: Self = Self::from_raw(0);
pub const fn from_raw(raw: c_int) -> Self {
Self { raw }
}
#[inline]
pub(crate) const fn raw(&self) -> c_int {
self.raw
}
}
impl From<usize> for Column {
#[inline]
fn from(value: usize) -> Self {
Column {
raw: value as c_int,
}
}
}
impl fmt::Debug for Column {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.raw.fmt(f)
}
}