pub trait ImageReader {
type Error;
// Required method
fn apply<P: AsRef<Path> + Send + Sync>(
&self,
imgs: impl IntoIterator<Item = P>,
) -> Result<Vec<RgbImage>, Self::Error>;
// Provided method
fn read_single<P: AsRef<Path> + Send + Sync>(
&self,
img_path: P,
) -> Result<RgbImage, Self::Error>
where Self::Error: From<OCRError> { ... }
}Expand description
Trait for reading images.
This trait defines the interface for reading images from paths.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.