pub enum SemanticError {
ConfidenceExceedsSourceBound {
requested: Confidence,
bound: Confidence,
source_kind: SourceKind,
},
SourceKindNotAdmitted {
source_kind: SourceKind,
memory_kind: MemoryKindTag,
},
FutureValidity {
valid_at: ClockTime,
},
InvalidClockOrder {
at_time: ClockTime,
observed_at: ClockTime,
},
EmptyDerivedFrom,
MissingKeyword {
keyword: &'static str,
form: &'static str,
},
BadKeywordType {
keyword: &'static str,
form: &'static str,
expected: &'static str,
},
ConfidenceMalformed(ConfidenceError),
CorrectsNonEpisodic,
MultipleEpisodeDirectives {
count: usize,
},
}Expand description
Errors produced by validate.
Variants§
ConfidenceExceedsSourceBound
A confidence value exceeded the bound for its source kind.
Fields
requested: ConfidenceThe requested confidence.
bound: ConfidenceThe source kind’s bound.
source_kind: SourceKindThe source kind derived from the source symbol.
SourceKindNotAdmitted
The source kind does not admit the memory kind.
Fields
source_kind: SourceKindThe derived source kind.
memory_kind: MemoryKindTagThe memory kind being written.
FutureValidity
Agent supplied a future valid_at without the :projected true flag.
InvalidClockOrder
Episodic observed_at predates at_time.
EmptyDerivedFrom
Inferential derived_from is empty.
MissingKeyword
A required keyword was missing post-bind. (Normally caught in parse, but present here as a safety net for future form changes.)
BadKeywordType
A keyword had the wrong type for the semantic stage.
Fields
ConfidenceMalformed(ConfidenceError)
A confidence value was malformed (e.g. NaN).
CorrectsNonEpisodic
A correct form’s corrected body is not an Epi form.
MultipleEpisodeDirectives
A batch contains more than one (episode …) directive. Per
episode-semantics.md § 3 / § 11, each batch corresponds to
at most one Episode, so a single directive per batch is the
only coherent shape.
Trait Implementations§
Source§impl Debug for SemanticError
impl Debug for SemanticError
Source§impl Display for SemanticError
impl Display for SemanticError
Source§impl Error for SemanticError
impl Error for SemanticError
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()