pub enum Error<E = Infallible> {
IriConfusedWithPrefix,
InvalidNestValue,
CollidingEntry,
ContextProcessing(Error<E>),
}Expand description
Error raised while compacting a document.
Variants§
IriConfusedWithPrefix
An IRI cannot be written out because it would be read back as a compact IRI.
See IriConfusedWithPrefix for the exact condition.
InvalidNestValue
A term definition’s @nest value is neither @nest itself nor a term
of the active context that expands to @nest.
CollidingEntry
The compaction target of a map-based container or @nest entry
already holds a non-map value: two terms compacted to the same key
with incompatible shapes. The JSON-LD specification does not define
an output for this state.
ContextProcessing(Error<E>)
A @context encountered during compaction could not be processed.
Compaction processes scoped contexts (@context entries inside term
definitions) as it descends, so any context-processing error can
surface here.
Implementations§
Trait Implementations§
Source§impl<E> Error for Error<E>
impl<E> Error for Error<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E> From<IriConfusedWithPrefix> for Error<E>
impl<E> From<IriConfusedWithPrefix> for Error<E>
Source§fn from(_: IriConfusedWithPrefix) -> Self
fn from(_: IriConfusedWithPrefix) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for Error<E>
impl<E> RefUnwindSafe for Error<E>where
Error<E>: RefUnwindSafe,
impl<E> Send for Error<E>
impl<E> Sync for Error<E>
impl<E> Unpin for Error<E>
impl<E> UnsafeUnpin for Error<E>where
Error<E>: UnsafeUnpin,
impl<E> UnwindSafe for Error<E>where
Error<E>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more