use core::ops::{Deref, DerefMut};
#[derive(Clone, Copy, Debug)]
pub struct Obj<T>(pub T);
impl<T> Obj<T> {
pub fn new(item: T) -> Self {
Obj(item)
}
}
impl<T> Deref for Obj<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<T> DerefMut for Obj<T> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}