#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
)]
pub enum DataKind {
U8,
I8,
U16,
I16,
U32,
I32,
U64,
I64,
U128,
I128,
Usize,
Isize,
#[cfg(feature = "f16")]
F16,
F32,
F64,
#[cfg(feature = "f128")]
F128,
#[cfg_attr(feature = "unstable_docs", doc = "Any [`*const _`](pointer) type.")]
#[cfg_attr(not(feature = "unstable_docs"), doc = "Any `*const _` type.")]
ConstPtr,
#[cfg_attr(feature = "unstable_docs", doc = "Any [`*mut _`](pointer) type.")]
#[cfg_attr(not(feature = "unstable_docs"), doc = "Any `*mut _` type.")]
MutPtr,
}
impl DataKind {
#[inline(always)]
#[must_use]
pub const fn is_size_like(self) -> bool {
matches!(
self,
| Self::Usize
| Self::Isize
| Self::ConstPtr
| Self::MutPtr,
)
}
}