use super::Cage;
use core::{
fmt::{
Debug,
Formatter,
Result as Format
},
hash::{
Hash,
Hasher
}
};
impl<Type: Debug + ?Sized> Debug for Cage<Type> {
fn fmt(&self, formatter: &mut Formatter<'_>) -> Format {write!(formatter, "Cage({:?})", &self.0)}
}
impl<Type: Clone + ?Sized> Clone for Cage<Type> {
fn clone(&self) -> Self {return Self::new(self.read().clone())}
}
impl<Type: Hash + ?Sized> Hash for Cage<Type> {
fn hash<H: Hasher>(&self, state: &mut H) {return self.read().hash(state)}
}