pub enum CoreError {
ConfigError(String),
TrainingError(String),
PredictionError(String),
}Expand description
Central error type for the gradient boosting library.
CoreError represents all possible failure modes in the core library operations,
including configuration issues, training failures, and prediction errors.
§Variants
ConfigError: Invalid model or tree configurationTrainingError: Failure during model trainingPredictionError: Failure during prediction
§Note
The error type uses thiserror for automatic std::error::Error implementation.
The thiserror crate must be in scope via use thiserror::Error or a re-export.
Variants§
ConfigError(String)
Invalid configuration parameter or incompatible settings.
TrainingError(String)
Error during model training (e.g., insufficient data, numerical instability).
PredictionError(String)
Error during prediction (e.g., mismatched feature dimensions, missing data).
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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<TreeError> for CoreError
Conversion from tree errors to core library errors.
impl From<TreeError> for CoreError
Conversion from tree errors to core library errors.
This From implementation enables seamless error propagation from
tree construction up to the main crate::core::CoreError type used
by the gradient booster.
All tree errors are converted to CoreError::TrainingError with a
descriptive message.
Auto Trait Implementations§
impl Freeze for CoreError
impl RefUnwindSafe for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnwindSafe for CoreError
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> 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 more