pub enum ConfigError {
InvalidBatchSize,
BatchSizeTooLarge {
actual: usize,
max: usize,
},
ModelPathNotFound {
path: PathBuf,
},
ModelPathNotFile {
path: PathBuf,
},
InvalidFieldValue {
field: String,
expected: String,
actual: String,
suggestion: String,
},
MissingRequiredField {
field: String,
suggestion: String,
},
InvalidConfig {
message: String,
},
ValidationFailed {
message: String,
},
ResourceLimitExceeded {
message: String,
},
DependencyError {
message: String,
},
TypeMismatch {
message: String,
},
}Expand description
Errors that can occur during configuration validation.
This enum represents various errors that can occur when validating configuration parameters in the OCR pipeline.
Variants§
InvalidBatchSize
Error indicating that a batch size is invalid (must be greater than 0).
BatchSizeTooLarge
Error indicating that a batch size exceeds the maximum allowed.
ModelPathNotFound
Error indicating that a model path does not exist.
ModelPathNotFile
Error indicating that a model path is not a file.
InvalidFieldValue
Error indicating that a configuration field has an invalid value.
MissingRequiredField
Error indicating that a required configuration field is missing.
InvalidConfig
Error indicating that a configuration is invalid.
ValidationFailed
Error indicating that validation failed.
ResourceLimitExceeded
Error indicating that a resource limit has been exceeded.
DependencyError
Error indicating a dependency issue in the task graph.
TypeMismatch
Error indicating a type mismatch in the task graph.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ConfigError> for OCRError
impl From<ConfigError> for OCRError
Source§fn from(error: ConfigError) -> OCRError
fn from(error: ConfigError) -> OCRError
Converts a ConfigError to OCRError::ConfigError.
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnwindSafe for ConfigError
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more