use super::*;
pub trait ViewMut: View {
type ViewMut<'a>: ViewMut where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b;
}
impl<T> ViewMut for [T] {
type ViewMut<'a> = &'a mut [T] where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b { self }
}
impl<T> ViewMut for &mut [T] {
type ViewMut<'a> = &'a mut [T] where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b { self }
}
impl<T> ViewMut for Vec<T> {
type ViewMut<'a> = &'a mut [T] where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b { self }
}
impl<T, const N: usize> ViewMut for [T; N] {
type ViewMut<'a> = &'a mut [T] where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b { self }
}
impl<T: ViewMut> ViewMut for &mut T {
type ViewMut<'a> = T::ViewMut<'a> where Self: 'a;
fn as_mut_view<'a, 'b>(&'a mut self) -> Self::ViewMut<'b> where 'a: 'b { (*self).as_mut_view() }
}