pub enum Error {
Show 16 variants
InputSize {
expected: usize,
got: usize,
},
BatchInputSize {
index: usize,
expected: usize,
got: usize,
},
ModelDetection {
reason: String,
},
LabelCount {
expected: usize,
got: usize,
},
ModelPathRequired,
LabelsRequired,
ModelLoad(Error),
LabelLoad {
path: String,
reason: String,
},
LabelParse(String),
Inference(String),
InvalidCoordinates {
latitude: f32,
longitude: f32,
reason: String,
},
InvalidDate {
month: u32,
day: u32,
reason: String,
},
RangeFilterInference(String),
RuntimeInit(String),
AudioFormat {
reason: String,
},
AudioRead {
path: String,
reason: String,
},
}Expand description
Errors that can occur during classifier operations.
Variants§
InputSize
Audio segment has wrong number of samples.
BatchInputSize
One segment in a batch has wrong number of samples.
Fields
ModelDetection
Failed to detect model type from ONNX structure.
LabelCount
Number of labels doesn’t match model output size.
ModelPathRequired
Model path was not provided to builder.
LabelsRequired
Labels were not provided to builder.
ModelLoad(Error)
Failed to load ONNX model.
LabelLoad
Failed to load labels from file.
LabelParse(String)
Failed to parse label file content.
Inference(String)
Inference execution failed.
InvalidCoordinates
Invalid geographic coordinates provided.
Fields
InvalidDate
Invalid date provided.
RangeFilterInference(String)
Range filter inference failed.
RuntimeInit(String)
Failed to initialize ONNX Runtime.
AudioFormat
Audio file format is not supported.
AudioRead
Failed to read audio file.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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