pub enum GlintError {
Show 17 variants
Io(Error),
Image(ImageError),
Config {
message: String,
},
Sensor {
message: String,
},
InvalidFormat {
path: PathBuf,
},
MissingFiles {
files: Vec<PathBuf>,
},
InvalidThreshold {
value: f64,
},
InvalidBitDepth {
bit_depth: u8,
},
DimensionMismatch {
expected: (u32, u32),
actual: (u32, u32),
},
BandCountMismatch {
expected: usize,
actual: usize,
},
Processing {
message: String,
},
Validation {
message: String,
},
Serialization(Error),
Deserialization(Error),
PatternMatch {
pattern: String,
},
Concurrency {
message: String,
},
ResourceExhaustion {
message: String,
},
}Expand description
Main error type for the glint mask generation library
Variants§
Io(Error)
Image(ImageError)
Config
Sensor
InvalidFormat
MissingFiles
InvalidThreshold
InvalidBitDepth
DimensionMismatch
BandCountMismatch
Processing
Validation
Serialization(Error)
Deserialization(Error)
PatternMatch
Concurrency
ResourceExhaustion
Implementations§
Source§impl GlintError
impl GlintError
Sourcepub fn processing(message: impl Into<String>) -> Self
pub fn processing(message: impl Into<String>) -> Self
Create a new processing error
Sourcepub fn validation(message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
Create a new validation error
Sourcepub fn concurrency(message: impl Into<String>) -> Self
pub fn concurrency(message: impl Into<String>) -> Self
Create a new concurrency error
Sourcepub fn resource_exhaustion(message: impl Into<String>) -> Self
pub fn resource_exhaustion(message: impl Into<String>) -> Self
Create a new resource exhaustion error
Trait Implementations§
Source§impl Debug for GlintError
impl Debug for GlintError
Source§impl Display for GlintError
impl Display for GlintError
Source§impl Error for GlintError
impl Error for GlintError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 From<Error> for GlintError
impl From<Error> for GlintError
Source§impl From<Error> for GlintError
impl From<Error> for GlintError
Source§impl From<Error> for GlintError
impl From<Error> for GlintError
Source§impl From<ImageError> for GlintError
impl From<ImageError> for GlintError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GlintError
impl !UnwindSafe for GlintError
impl Freeze for GlintError
impl Send for GlintError
impl Sync for GlintError
impl Unpin for GlintError
impl UnsafeUnpin for GlintError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more