pub enum FittedModelError {
SchemaMismatch {
reason: String,
},
PayloadCorrupt {
reason: String,
},
MissingField {
reason: String,
},
IncompatibleConfig {
reason: String,
},
InvalidInput {
reason: String,
},
}Expand description
Typed error surface for src/inference/model.rs saved-model code.
Every variant carries a free-form reason: String payload; Display
emits exactly that payload, so converting a FittedModelError into
String (via the From impl below) is byte-equivalent to the pre-
refactor Err(format!(...)) / Err("...".to_string()) strings that
the same call sites produced. This lets external callers keep using
? against Result<_, String> without source changes — the typed
enum is purely an in-module discipline gain.
Variants§
SchemaMismatch
Saved payload structure / shape / version disagrees with what the current binary expects (e.g. covariance shape, block ordering, schema version, C2 continuity, out-of-range span/basis indices).
PayloadCorrupt
Saved payload bytes / numeric content are corrupt or unreadable (non-finite scalars, invalid JSON, IO failure, malformed stateful link state).
MissingField
A required field that the current code path needs is absent from
the payload (typically ..; refit errors).
IncompatibleConfig
A combination of saved-model options is not supported by the current binary (unsupported deployment-extension kind, unsupported kernel marker, unsupported survival_time_basis variant, etc.).
InvalidInput
An input value rejected by a save-time sanity gate (e.g. negative ridge alpha).
Trait Implementations§
Source§impl Clone for FittedModelError
impl Clone for FittedModelError
Source§fn clone(&self) -> FittedModelError
fn clone(&self) -> FittedModelError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FittedModelError
impl Debug for FittedModelError
Source§impl Display for FittedModelError
impl Display for FittedModelError
impl Eq for FittedModelError
Source§impl Error for FittedModelError
impl Error for FittedModelError
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
use the Display impl or to_string()
Source§impl From<FittedModelError> for String
impl From<FittedModelError> for String
Source§fn from(err: FittedModelError) -> String
fn from(err: FittedModelError) -> String
Source§impl From<FittedModelError> for EstimationError
impl From<FittedModelError> for EstimationError
Source§fn from(err: FittedModelError) -> Self
fn from(err: FittedModelError) -> Self
Source§impl From<FittedModelError> for SurvivalPredictError
impl From<FittedModelError> for SurvivalPredictError
Source§fn from(err: FittedModelError) -> Self
fn from(err: FittedModelError) -> Self
Source§impl PartialEq for FittedModelError
impl PartialEq for FittedModelError
Source§fn eq(&self, other: &FittedModelError) -> bool
fn eq(&self, other: &FittedModelError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FittedModelError
Auto Trait Implementations§
impl Freeze for FittedModelError
impl RefUnwindSafe for FittedModelError
impl Send for FittedModelError
impl Sync for FittedModelError
impl Unpin for FittedModelError
impl UnsafeUnpin for FittedModelError
impl UnwindSafe for FittedModelError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T, U> Imply<T> for U
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar 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.