Enum ocrs::ImageSourceError
source · pub enum ImageSourceError {
UnsupportedChannelCount,
InvalidDataLength,
}
Expand description
Errors that can occur when creating an ImageSource.
Variants§
UnsupportedChannelCount
The image channel count is not 1 (greyscale), 3 (RGB) or 4 (RGBA).
InvalidDataLength
The image data length is not a multiple of the channel size.
Trait Implementations§
source§impl Clone for ImageSourceError
impl Clone for ImageSourceError
source§fn clone(&self) -> ImageSourceError
fn clone(&self) -> ImageSourceError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ImageSourceError
impl Debug for ImageSourceError
source§impl Display for ImageSourceError
impl Display for ImageSourceError
source§impl Error for ImageSourceError
impl Error for ImageSourceError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for ImageSourceError
impl PartialEq for ImageSourceError
source§fn eq(&self, other: &ImageSourceError) -> bool
fn eq(&self, other: &ImageSourceError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ImageSourceError
Auto Trait Implementations§
impl Freeze for ImageSourceError
impl RefUnwindSafe for ImageSourceError
impl Send for ImageSourceError
impl Sync for ImageSourceError
impl Unpin for ImageSourceError
impl UnwindSafe for ImageSourceError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more