rstmt-core 0.1.0

the core modules for the rstmt framework
Documentation
/*
    Appellation: impl_pitch_repr <module>
    Created At: 2025.12.20:09:08:56
    Contrib: @FL03
*/
use crate::pitch::{Pitch, RawPitch};

impl<T> Pitch<&T>
where
    T: RawPitch,
{
    /// returns a new instance of the [`Pitch`] containing a cloned inner value
    pub fn cloned(&self) -> Pitch<T>
    where
        T: Clone,
    {
        Pitch::new(self.0.clone())
    }
    /// returns a new instance of the [`Pitch`] containing a copied inner value
    pub const fn copied(&self) -> Pitch<T>
    where
        T: Copy,
    {
        Pitch::new(*self.0)
    }
}

impl<T> Pitch<&mut T>
where
    T: RawPitch,
{
    /// returns a new instance of the [`Pitch`] containing a cloned inner value
    pub fn cloned(&self) -> Pitch<T>
    where
        T: Clone,
    {
        Pitch::new(self.0.clone())
    }
    /// returns a new instance of the [`Pitch`] containing a copied inner value
    pub const fn copied(&self) -> Pitch<T>
    where
        T: Copy,
    {
        Pitch::new(*self.0)
    }
}