use super::Array;
use core::{
slice::{
from_raw_parts as fat,
from_raw_parts_mut as mutfat
},
borrow::{
Borrow,
BorrowMut
}
};
impl<Type, const N: usize> AsRef<[Type]> for Array<Type, N> {
fn as_ref(&self) -> &[Type] {return unsafe {fat(self.ptr(), self.length)}}
}
impl<Type, const N: usize> AsMut<[Type]> for Array<Type, N> {
fn as_mut(&mut self) -> &mut [Type] {return unsafe {mutfat(self.mutptr(), self.length)}}
}
impl<Type, const N: usize> Borrow<[Type]> for Array<Type, N> {
fn borrow(&self) -> &[Type] {self.as_ref()}
}
impl<Type, const N: usize> BorrowMut<[Type]> for Array<Type, N> {
fn borrow_mut(&mut self) -> &mut [Type] {self.as_mut()}
}