singleton-stepanov 1.1.0

It isn't meant to be used by itself, but as template for your our types. Attempt to do Efficient Programming with Components: Lecture 2 Part 1, Efficient Programming with Components: Lecture 2 Part 2 and Efficient Programming with Components: Lecture 3 Part 1 from C++ to Ruts. [1] https://www.youtube.com/watch?v=FUMPsmKnKv8 [2] https://www.youtube.com/watch?v=B5yiLvaxPS4 [3] https://www.youtube.com/watch?v=sp_IBYVqMeQ
Documentation
use std::fmt::Debug;

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct Singleton<T> {
    value: T,
}
impl<T: Debug> Singleton<T> {
    pub fn new(value: T) -> Self {
        Self { value }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct SemiRegular<T> {
    value: T,
}
impl<T: Debug + Clone> SemiRegular<T> {
    pub fn new(value: T) -> Self {
        Self { value }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct Regular<T> {
    value: T,
}
impl<T: Debug + Clone + Eq> Regular<T> {
    pub fn new(value: T) -> Self {
        Self { value }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct TotallyOrdered<T> {
    value: T,
}
impl<T: Debug + Clone + Eq + Ord> TotallyOrdered<T> {
    pub fn new(value: T) -> Self {
        Self { value }
    }
}