Enum json_ld_syntax::ErrorCode

source ·
pub enum ErrorCode {
Show 51 variants CollidingKeywords, ConflictingIndexes, ContextOverflow, CyclicIriMapping, InvalidIdValue, InvalidImportValue, InvalidIncludedValue, InvalidIndexValue, InvalidNestValue, InvalidPrefixValue, InvalidPropagateValue, InvalidProtectedValue, InvalidReverseValue, InvalidVersionValue, InvalidBaseDirection, InvalidBaseIri, InvalidContainerMapping, InvalidContextEntry, InvalidContextNullification, InvalidDefaultLanguage, InvalidIriMapping, InvalidJsonLiteral, InvalidKeywordAlias, InvalidLanguageMapValue, InvalidLanguageMapping, InvalidLanguageTaggedString, InvalidLanguageTaggedValue, InvalidLocalContext, InvalidRemoteContext, InvalidReverseProperty, InvalidReversePropertyMap, InvalidReversePropertyValue, InvalidScopedContext, InvalidScriptElement, InvalidSetOrListObject, InvalidTermDefinition, InvalidTypeMapping, InvalidTypeValue, InvalidTypedValue, InvalidValueObject, InvalidValueObjectValue, InvalidVocabMapping, IriConfusedWithPrefix, KeyExpansionFailed, KeywordRedefinition, LoadingDocumentFailed, LoadingRemoteContextFailed, MultipleContextLinkHeaders, ProcessingModeConflict, ProtectedTermRedefinition, DuplicateKey,
}
Expand description

Error code.

Variants§

§

CollidingKeywords

Two properties which expand to the same keyword have been detected. This might occur if a keyword and an alias thereof are used at the same time.

§

ConflictingIndexes

Multiple conflicting indexes have been found for the same node.

§

ContextOverflow

maximum number of @context URLs exceeded.

§

CyclicIriMapping

A cycle in IRI mappings has been detected.

§

InvalidIdValue

An @id entry was encountered whose value was not a string.

§

InvalidImportValue

An invalid value for @import has been found.

§

InvalidIncludedValue

An included block contains an invalid value.

§

InvalidIndexValue

An @index entry was encountered whose value was not a string.

§

InvalidNestValue

An invalid value for @nest has been found.

§

InvalidPrefixValue

An invalid value for @prefix has been found.

§

InvalidPropagateValue

An invalid value for @propagate has been found.

§

InvalidProtectedValue

An invalid value for @protected has been found.

§

InvalidReverseValue

An invalid value for an @reverse entry has been detected, i.e., the value was not a map.

§

InvalidVersionValue

The @version entry was used in a context with an out of range value.

§

InvalidBaseDirection

The value of @direction is not “ltr”, “rtl”, or null and thus invalid.

§

InvalidBaseIri

An invalid base IRI has been detected, i.e., it is neither an IRI nor null.

§

InvalidContainerMapping

An @container entry was encountered whose value was not one of the following strings: @list, @set, or @index.

§

InvalidContextEntry

An entry in a context is invalid due to processing mode incompatibility.

§

InvalidContextNullification

An attempt was made to nullify a context containing protected term definitions.

§

InvalidDefaultLanguage

The value of the default language is not a string or null and thus invalid.

§

InvalidIriMapping

A local context contains a term that has an invalid or missing IRI mapping.

§

InvalidJsonLiteral

An invalid JSON literal was detected.

§

InvalidKeywordAlias

An invalid keyword alias definition has been encountered.

§

InvalidLanguageMapValue

An invalid value in a language map has been detected. It MUST be a string or an array of strings.

§

InvalidLanguageMapping

An @language entry in a term definition was encountered whose value was neither a string nor null and thus invalid.

§

InvalidLanguageTaggedString

A language-tagged string with an invalid language value was detected.

§

InvalidLanguageTaggedValue

A number, true, or false with an associated language tag was detected.

§

InvalidLocalContext

An invalid local context was detected.

§

InvalidRemoteContext

No valid context document has been found for a referenced remote context.

§

InvalidReverseProperty

An invalid reverse property definition has been detected.

§

InvalidReversePropertyMap

An invalid reverse property map has been detected. No keywords apart from @context are allowed in reverse property maps.

§

InvalidReversePropertyValue

An invalid value for a reverse property has been detected. The value of an inverse property must be a node object.

§

InvalidScopedContext

The local context defined within a term definition is invalid.

§

InvalidScriptElement

A script element in HTML input which is the target of a fragment identifier does not have an appropriate type attribute.

§

InvalidSetOrListObject

A set object or list object with disallowed entries has been detected.

§

InvalidTermDefinition

An invalid term definition has been detected.

§

InvalidTypeMapping

An @type entry in a term definition was encountered whose value could not be expanded to an IRI.

§

InvalidTypeValue

An invalid value for an @type entry has been detected, i.e., the value was neither a string nor an array of strings.

§

InvalidTypedValue

A typed value with an invalid type was detected.

§

InvalidValueObject

A value object with disallowed entries has been detected.

§

InvalidValueObjectValue

An invalid value for the @value entry of a value object has been detected, i.e., it is neither a scalar nor null.

§

InvalidVocabMapping

An invalid vocabulary mapping has been detected, i.e., it is neither an IRI nor null.

§

IriConfusedWithPrefix

When compacting an IRI would result in an IRI which could be confused with a compact IRI (because its IRI scheme matches a term definition and it has no IRI authority).

§

KeyExpansionFailed

Unable to expand a key into a IRI, blank node identifier or keyword using the current key expansion policy. Note: this error is not defined in the JSON-LD API specification.

§

KeywordRedefinition

A keyword redefinition has been detected.

§

LoadingDocumentFailed

The document could not be loaded or parsed as JSON.

§

LoadingRemoteContextFailed

There was a problem encountered loading a remote context.

§

MultipleContextLinkHeaders

Multiple HTTP Link Headers RFC8288 using the http://www.w3.org/ns/json-ld#context link relation have been detected.

§

ProcessingModeConflict

An attempt was made to change the processing mode which is incompatible with the previous specified version.

§

ProtectedTermRedefinition

An attempt was made to redefine a protected term.

§

DuplicateKey

Duplicate key in JSON object.

Implementations§

source§

impl ErrorCode

source

pub fn as_str(&self) -> &str

Get the error message corresponding to the error code.

Trait Implementations§

source§

impl Clone for ErrorCode

source§

fn clone(&self) -> ErrorCode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ErrorCode

source§

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

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

impl Display for ErrorCode

source§

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

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

impl Hash for ErrorCode

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for ErrorCode

source§

fn cmp(&self, other: &ErrorCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ErrorCode

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ErrorCode

source§

fn partial_cmp(&self, other: &ErrorCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> TryFrom<&'a str> for ErrorCode

§

type Error = ()

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

fn try_from(name: &'a str) -> Result<ErrorCode, ()>

Performs the conversion.
source§

impl Copy for ErrorCode

source§

impl Eq for ErrorCode

source§

impl StructuralPartialEq for ErrorCode

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> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. 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> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

impl<T> CallHasher for T
where T: Hash + ?Sized,

source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

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, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

default 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>,

§

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, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

source§

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

§

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<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

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

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>