Skip to main content

SemanticError

Enum SemanticError 

Source
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: Confidence

The requested confidence.

§bound: Confidence

The source kind’s bound.

§source_kind: SourceKind

The source kind derived from the source symbol.

§

SourceKindNotAdmitted

The source kind does not admit the memory kind.

Fields

§source_kind: SourceKind

The derived source kind.

§memory_kind: MemoryKindTag

The memory kind being written.

§

FutureValidity

Agent supplied a future valid_at without the :projected true flag.

Fields

§valid_at: ClockTime

The offending timestamp.

§

InvalidClockOrder

Episodic observed_at predates at_time.

Fields

§at_time: ClockTime

The event time.

§observed_at: ClockTime

The observation 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.)

Fields

§keyword: &'static str

Missing keyword.

§form: &'static str

Form being validated.

§

BadKeywordType

A keyword had the wrong type for the semantic stage.

Fields

§keyword: &'static str

Keyword.

§form: &'static str

Form.

§expected: &'static str

Description of expected type.

§

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.

Fields

§count: usize

Number of episode forms in the batch.

Trait Implementations§

Source§

impl Debug for SemanticError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SemanticError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SemanticError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ConfidenceError> for SemanticError

Source§

fn from(source: ConfidenceError) -> Self

Converts to this type from the input type.
Source§

impl From<SemanticError> for PipelineError

Source§

fn from(source: SemanticError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SemanticError

Source§

fn eq(&self, other: &SemanticError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SemanticError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more