#[cfg(doc)]
use super::BasicLeaf;
use crate::options::{Fanout, NoSize, StoreKeys};
use core::marker::PhantomData;
use core::ops::{AddAssign, SubAssign};
use integral_constant::{Bool, Usize};
mod sealed {
pub trait Sealed {}
}
pub trait BasicOptions: sealed::Sealed {
type SizeType: Clone + Default + Eq + AddAssign + SubAssign;
type StoreKeys: StoreKeys;
type Fanout: Fanout;
}
#[rustfmt::skip]
pub type Options<
SizeType = NoSize,
const STORE_KEYS: bool = false,
const FANOUT: usize = 8,
> = TypedOptions<
SizeType,
Bool<STORE_KEYS>,
Usize<FANOUT>,
>;
#[allow(clippy::type_complexity)]
#[rustfmt::skip]
pub struct TypedOptions<
SizeType = NoSize,
StoreKeys = Bool<false>,
Fanout = Usize<8>,
>(PhantomData<fn() -> (
SizeType,
StoreKeys,
Fanout,
)>);
#[rustfmt::skip]
impl<
SizeType,
StoreKeys,
Fanout,
> sealed::Sealed for TypedOptions<
SizeType,
StoreKeys,
Fanout,
> {}
#[rustfmt::skip]
impl<
SizeType: Clone + Default + Eq + AddAssign + SubAssign,
StoreKeys: self::StoreKeys,
Fanout: self::Fanout,
> BasicOptions for TypedOptions<
SizeType,
StoreKeys,
Fanout,
> {
type SizeType = SizeType;
type StoreKeys = StoreKeys;
type Fanout = Fanout;
}