// Copyright 2025 Gabriel Bjørnager Jensen.

mod test;

use crate::UintLeast32;

use core::convert::Infallible;

/// Denotes an unsigned integer that is at least as wide as [`u64`].
///
/// # Safety
///
/// Only primitive, unsigned, integral types that fit the size requirement may implement this type.
pub trait UintLeast64
where
	Self:
		crate::seal::UintLeast64
		+ UintLeast32
		+ From<u64>
		+ TryFrom<u64, Error = Infallible>,
{}

macro_rules! impl_uint_least64 {
	{ $($Ty:ty),*$(,)? } => {$(
		impl ::multitype::seal::UintLeast64 for $Ty {}

		impl ::multitype::UintLeast64 for $Ty {}
	)*};
}

impl_uint_least64! {
	u64,
	u128,
}
