pub enum Warning<B> {
MalformedIri(String),
EmptyTerm,
BlankNodeIdProperty(B),
MalformedLanguageTag(String, InvalidLangTag<String>),
ContextProcessing(Warning),
}Expand description
Warning raised while expanding a document.
Variants§
MalformedIri(String)
A term expanded to a string that is not a well-formed IRI. It becomes
an invalid identifier, which the Policy in use
decides to keep, drop or reject.
EmptyTerm
A JSON object has an empty key, which no context can define as a term.
BlankNodeIdProperty(B)
A key expanded to a blank node identifier, making it a property with no RDF equivalent unless generalized RDF is allowed.
MalformedLanguageTag(String, InvalidLangTag<String>)
A language tag is not well-formed per BCP 47. It is kept in the expanded document as it is; the warning carries the tag and the reason it was rejected.
ContextProcessing(Warning)
A warning raised while processing a scoped or local @context.
Implementations§
Source§impl<B> Warning<B>
impl<B> Warning<B>
Sourcepub fn map_blank_id<C>(self, map: impl FnOnce(B) -> C) -> Warning<C>
pub fn map_blank_id<C>(self, map: impl FnOnce(B) -> C) -> Warning<C>
Rewrites the blank node identifier this warning carries, if any.
Warning::BlankNodeIdProperty is the only variant holding one. Use
this when a warning crosses from one vocabulary to another, so that the
handler resolving the identifier for display looks it up in the
vocabulary that minted it rather than printing the wrong blank node.
Trait Implementations§
Source§impl<B, N: BlankIdVocabulary<BlankId = B>> DisplayWithContext<N> for Warning<B>
impl<B, N: BlankIdVocabulary<BlankId = B>> DisplayWithContext<N> for Warning<B>
Source§impl<B> From<MalformedIri> for Warning<B>
impl<B> From<MalformedIri> for Warning<B>
Source§fn from(MalformedIri: MalformedIri) -> Self
fn from(MalformedIri: MalformedIri) -> Self
Auto Trait Implementations§
impl<B> Freeze for Warning<B>where
B: Freeze,
impl<B> RefUnwindSafe for Warning<B>where
B: RefUnwindSafe,
impl<B> Send for Warning<B>where
B: Send,
impl<B> Sync for Warning<B>where
B: Sync,
impl<B> Unpin for Warning<B>where
B: Unpin,
impl<B> UnsafeUnpin for Warning<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Warning<B>where
B: 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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Unordered reference.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>,
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>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more