[][src]Enum sophia_term::TermError

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),
}

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

Variants

InvalidDatatype(String)

Datatypes must be IRIs.

InvalidIri(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

The language tags of literals must apply to BCP47.

Fields of InvalidLanguageTag

tag: String

The provided, faulty language tag.

err: String

What is wrong with tag.

InvalidLexicalValue

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

Fields of InvalidLexicalValue

lex: String

The faulty lexical value.

dt: String

The literal datatype IRI.

source: Box<dyn Error>

The underlying error.

InvalidVariableName(String)

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

InvalidBlankNodeId(String)

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

UnsupportedKind(String)

Raised when failing to convert a term into another type

UnsupportedDatatype(String)

Raised when failing to convert a literal into a native type

Trait Implementations

impl Debug for TermError[src]

impl Display for TermError[src]

impl Error for TermError[src]

impl From<Infallible> for TermError[src]

Auto Trait Implementations

impl !RefUnwindSafe for TermError

impl !Send for TermError

impl !Sync for TermError

impl Unpin for TermError

impl !UnwindSafe for TermError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.