pub enum SurvivalPredictError {
InvalidInput {
reason: String,
},
MissingFitMetadata {
reason: String,
},
IncompatibleSchema {
reason: String,
},
UnsupportedConfiguration {
reason: String,
},
NumericalFailure {
reason: String,
},
ModelPayload {
context: &'static str,
source: FittedModelError,
},
}Expand description
Typed errors emitted by the survival prediction pipeline.
Each variant carries a pre-formatted reason string so Display is
byte-equivalent to the original format!(...) outputs the module used
before the typed-error migration. The category split lets callers
pattern-match on the failure kind without dragging the string apart.
Variants§
InvalidInput
Request-level input did not satisfy the predict contract: bad offset lengths, malformed time grids, empty grids, non-finite times.
MissingFitMetadata
The saved model is missing metadata required to drive the prediction (anchor, link/distribution tags, likelihood-mode marker, etc.) or carries legacy metadata that the current runtime refuses to consume.
IncompatibleSchema
Saved coefficient blocks, design columns, or baseline-timewiggle runtime dimensions disagree with the rebuilt prediction designs.
UnsupportedConfiguration
The requested combination of saved-model mode and predict-time
options is not implemented in this library entry point yet (e.g.
uncertainty for non-location-scale, latent window prediction,
competing-risks with with_uncertainty).
NumericalFailure
A numerical step (hazard / derivative / survival reconstruction) produced a non-finite or out-of-domain value that downstream code cannot consume.
ModelPayload
Saved-model validation failed below this prediction layer; the model source error keeps its own payload/schema category.
Trait Implementations§
Source§impl Clone for SurvivalPredictError
impl Clone for SurvivalPredictError
Source§fn clone(&self) -> SurvivalPredictError
fn clone(&self) -> SurvivalPredictError
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 SurvivalPredictError
impl Debug for SurvivalPredictError
Source§impl Display for SurvivalPredictError
impl Display for SurvivalPredictError
Source§impl Error for SurvivalPredictError
impl Error for SurvivalPredictError
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<DataError> for SurvivalPredictError
impl From<DataError> for SurvivalPredictError
Source§fn from(err: DataError) -> SurvivalPredictError
fn from(err: DataError) -> SurvivalPredictError
Column-resolution failures from resolve_role_col / resolve_col
land as InvalidInput since they reflect a mismatch between the
caller-supplied predict frame and the model’s expected schema.
Source§impl From<FittedModelError> for SurvivalPredictError
impl From<FittedModelError> for SurvivalPredictError
Source§fn from(err: FittedModelError) -> Self
fn from(err: FittedModelError) -> Self
Source§impl From<String> for SurvivalPredictError
impl From<String> for SurvivalPredictError
Source§fn from(reason: String) -> SurvivalPredictError
fn from(reason: String) -> SurvivalPredictError
Inbound conversion from the many Result<_, String> helpers this
module still calls into (basis builders, fit deserializers,
term-collection assembly). The text is preserved verbatim; we only
pick a category so external messages flow through ? without
per-callsite .map_err.
Source§impl From<SurvivalPredictError> for String
impl From<SurvivalPredictError> for String
Source§fn from(err: SurvivalPredictError) -> String
fn from(err: SurvivalPredictError) -> String
Auto Trait Implementations§
impl Freeze for SurvivalPredictError
impl RefUnwindSafe for SurvivalPredictError
impl Send for SurvivalPredictError
impl Sync for SurvivalPredictError
impl Unpin for SurvivalPredictError
impl UnsafeUnpin for SurvivalPredictError
impl UnwindSafe for SurvivalPredictError
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,
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,
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.