use iced_core::Size;
use std::fmt::Debug;
pub trait Storage {
type Entry: Entry;
type State<'a>;
fn upload(
&mut self,
width: u32,
height: u32,
data: &[u8],
state: &mut Self::State<'_>,
) -> Option<Self::Entry>;
fn remove(&mut self, entry: &Self::Entry, state: &mut Self::State<'_>);
}
pub trait Entry: Debug {
fn size(&self) -> Size<u32>;
}