consecuit 0.2.0

A functional web UI framework that uses the type system for hooks and more
Documentation
/** Internal use. Sealed.
 */
#[sealed::sealed]
pub trait StoresList: Sized + Default + 'static {
    type Head: Sized;
    type Tail: Sized + StoresList;
    fn create() -> Self;
}

/** Internal use.
 */
#[derive(Default)]
pub struct StoreCons<H: Default, T: Default>(pub(crate) H, pub(crate) T);

/** Internal use.
 */
#[derive(Default)]
pub struct StoreConsEnd;

#[sealed::sealed]
impl<H: Default + 'static, T: Default + 'static> StoresList for StoreCons<H, T>
where
    T: StoresList,
{
    type Head = H;
    type Tail = T;
    fn create() -> Self {
        Self(H::default(), T::create())
    }
}

#[sealed::sealed]
impl StoresList for StoreConsEnd {
    type Head = Self;
    type Tail = Self;
    fn create() -> Self {
        Self
    }
}