pub trait View<'a> {
type Superset;
fn split(orig: Self::Superset) -> Self;
}
impl<'a, T> View<'a> for &'a T {
type Superset = Self;
fn split(orig: Self::Superset) -> Self {
orig
}
}
impl<'a, T> View<'a> for &'a mut T {
type Superset = Self;
fn split(orig: Self::Superset) -> Self {
orig
}
}