pub enum EntrenarError {
ConfigNotFound {
path: PathBuf,
},
ConfigParsing {
path: PathBuf,
message: String,
},
ConfigValue {
field: String,
message: String,
suggestion: String,
},
ModelNotFound {
path: PathBuf,
},
UnsupportedFormat {
format: String,
},
HuggingFace {
message: String,
},
InsufficientMemory {
required: f64,
available: f64,
},
ShapeMismatch {
expected: Vec<usize>,
actual: Vec<usize>,
},
Io {
context: String,
source: Error,
},
Serialization {
message: String,
},
Cancelled,
Internal {
message: String,
},
}Expand description
Errors that can occur in entrenar CLI tools.
Each variant includes actionable context following the Andon principle of making problems immediately visible and actionable.
Variants§
ConfigNotFound
Configuration file not found at expected path.
ConfigParsing
Configuration file has invalid syntax.
ConfigValue
Configuration value is invalid.
ModelNotFound
Model file not found.
UnsupportedFormat
Model format is unsupported.
HuggingFace
HuggingFace API error.
InsufficientMemory
Insufficient memory for operation.
ShapeMismatch
Invalid tensor shape.
Io
IO error with context.
Serialization
Serialization/deserialization error.
Cancelled
User interrupted operation.
Internal
Generic error for unexpected conditions.
Implementations§
Trait Implementations§
Source§impl Debug for EntrenarError
impl Debug for EntrenarError
Source§impl Display for EntrenarError
impl Display for EntrenarError
Source§impl Error for EntrenarError
impl Error for EntrenarError
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 !RefUnwindSafe for EntrenarError
impl !UnwindSafe for EntrenarError
impl Freeze for EntrenarError
impl Send for EntrenarError
impl Sync for EntrenarError
impl Unpin for EntrenarError
impl UnsafeUnpin for EntrenarError
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