pub enum Error {
Show 20 variants
InteriorNul,
EnvironmentCreation,
ClearRejected,
Build(BuildError),
Evaluation(EvaluationError),
Load(LoadError),
Assertion(AssertionError),
Retraction(RetractionError),
FactBuilder(FactBuilderError),
InstanceBuilder(InstanceBuilderError),
MakeInstance(MakeInstanceError),
UnmakeInstance(UnmakeInstanceError),
FunctionCall(FunctionCallError),
FactModifier(FactModifierError),
InstanceModifier(InstanceModifierError),
Persistence(PersistenceError),
PutSlot(PutSlotError),
GetSlot(GetSlotError),
UnexpectedValueType(u16),
ForeignEnvironment,
}Expand description
Anything that can go wrong in a CLIPS operation.
Most variants wrap a CLIPS error enum unchanged, so the specific code CLIPS reported is preserved rather than flattened into one opaque failure.
Variants§
InteriorNul
A Rust string contained a NUL byte and so cannot cross into C.
EnvironmentCreation
CLIPS could not allocate a new environment.
ClearRejected
A clear-ready hook vetoed crate::Environment::clear.
Build(BuildError)
Defining a construct failed.
Evaluation(EvaluationError)
Evaluating an expression failed.
Load(LoadError)
Loading constructs from a file or string failed.
Assertion(AssertionError)
Asserting a fact failed.
Retraction(RetractionError)
Retracting a fact failed.
FactBuilder(FactBuilderError)
Creating or asserting through a fact builder failed.
InstanceBuilder(InstanceBuilderError)
Creating or making through an instance builder failed.
MakeInstance(MakeInstanceError)
Creating an instance from make-instance syntax failed.
UnmakeInstance(UnmakeInstanceError)
Deleting an instance failed.
FunctionCall(FunctionCallError)
Calling a CLIPS function failed.
FactModifier(FactModifierError)
Modifying a fact failed.
InstanceModifier(InstanceModifierError)
Modifying an instance failed.
Persistence(PersistenceError)
Saving or loading constructs, facts, or instances failed.
PutSlot(PutSlotError)
Writing a slot failed.
GetSlot(GetSlotError)
Reading a slot failed.
UnexpectedValueType(u16)
A value carried a CLIPS type tag this crate does not model. The payload
is the raw tag from the value’s TypeHeader.
ForeignEnvironment
A handle or value from a different CLIPS environment was supplied.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()