#![no_std]
pub trait Is {
type Type: ?Sized;
fn into_val(self) -> Self::Type;
fn into_ref(&self) -> &Self::Type;
fn into_mut_ref(&mut self) -> &mut Self::Type;
fn from_val(x: Self::Type) -> Self;
fn from_ref(x: &Self::Type) -> &Self;
fn from_mut_ref(x: &mut Self::Type) -> &mut Self;
}
impl<T> Is for T {
type Type = T;
fn into_val(self) -> Self::Type {
self
}
fn into_ref(&self) -> &Self::Type {
self
}
fn into_mut_ref(&mut self) -> &mut Self::Type {
self
}
fn from_val(x: Self::Type) -> Self {
x
}
fn from_ref(x: &Self::Type) -> &Self {
x
}
fn from_mut_ref(x: &mut Self::Type) -> &mut Self {
x
}
}