use std::io;
pub trait ImageStream {
fn open(&self) -> io::Result<(Box<dyn io::Read>, bool)>;
fn into_ref(self) -> ImageStreamRef
where
Self: 'static + Sized + Send + Sync,
{
Box::new(self)
}
}
pub type ImageStreamRef = Box<dyn ImageStream + Send + Sync>;