Enum sophia_term::TermError[][src]

pub enum TermError {
    InvalidDatatype(String),
    InvalidIri(String),
    IsSuffixed,
    InvalidLanguageTag {
        tag: String,
        err: String,
    },
    InvalidLexicalValue {
        lex: String,
        dt: String,
        source: Box<dyn Error>,
    },
    InvalidVariableName(String),
    InvalidBlankNodeId(String),
    UnsupportedKind(String),
    UnsupportedDatatype(String),
}
Expand description

This error is raised when the creation of a term fails.

Variants

InvalidDatatype(String)

Tuple Fields

0: String

Datatypes must be IRIs.

InvalidIri(String)

Tuple Fields

0: String

The IRI of a term must apply to RFC 3987.

IsSuffixed

An IRI must be represented by one TermData to be able to convert it to a Namespace.

InvalidLanguageTag

Fields

tag: String

The provided, faulty language tag.

err: String

What is wrong with tag.

The language tags of literals must apply to BCP47.

InvalidLexicalValue

Fields

lex: String

The faulty lexical value.

dt: String

The literal datatype IRI.

source: Box<dyn Error>

The underlying error.

The lexical value of a literal can not be interpreted according to its datatype

InvalidVariableName(String)

Tuple Fields

0: String

Names of variables must apply to SPARQL’s production rules.

InvalidBlankNodeId(String)

Tuple Fields

0: String

Names of variables must apply to N3’s production rules.

UnsupportedKind(String)

Tuple Fields

0: String

Raised when failing to convert a term into another type

UnsupportedDatatype(String)

Tuple Fields

0: String

Raised when failing to convert a literal into a native type

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.