use core::ops::{Index, IndexMut};
pub trait StorageBackend<T>: Index<usize, Output = T> + IntoIterator {
type Rebind<U>: StorageBackend<U> + IndexMut<usize>;
fn len(&self) -> usize;
fn iter<'a>(&'a self) -> impl Iterator<Item = &'a T>
where
T: 'a;
fn map_to_buffer<U>(&self, f: impl Fn(usize) -> U) -> Self::Rebind<U>;
#[inline]
fn is_empty(&self) -> bool {
self.len() == 0
}
}