pub enum ValueKind<'a, T, B> {
Node {
id: Option<&'a Id<T, B>>,
},
Graph {
id: Option<&'a Id<T, B>>,
},
Literal {
datatype: Option<&'a T>,
},
LangString {
language: Option<&'a LenientLangTag>,
direction: Option<Direction>,
},
Json,
List(&'a [ValueKind<'a, T, B>]),
EmptyArray,
}Expand description
Kind of a value described by a ValueHint.
Each variant stands for one shape of expanded JSON-LD and carries exactly the parts of it that IRI compaction reads.
Variants§
Node
A node object that is not a graph object, such as a node reference
({"@id": ...}), together with its @id, if any.
When the @id compacts to a term whose IRI mapping is that same
@id, term selection prefers @vocab-typed terms over @id-typed
ones.
Graph
A graph object (a node object whose only entries are @graph and
optionally @id and @index), together with its @id, if any.
Literal
A value object whose @value is a string, number, boolean or null,
with no @language and no @direction.
LangString
A value object holding a string with a @language, a @direction, or
both.
Fields
language: Option<&'a LenientLangTag>The value’s @language.
Json
A value object of type @json.
List(&'a [ValueKind<'a, T, B>])
A list object, with the kinds of its items in order.
Only whether each item is a value object, and its type, language and
direction if it is, take part in term selection; @index entries of
the items do not.
EmptyArray
The empty array an expanded property holds when it has no values.
Selects the term an @id-less node object would.
Trait Implementations§
impl<'a, T, B> Copy for ValueKind<'a, T, B>
Auto Trait Implementations§
impl<'a, T, B> Freeze for ValueKind<'a, T, B>
impl<'a, T, B> RefUnwindSafe for ValueKind<'a, T, B>where
Option<&'a Id<T, B>>: RefUnwindSafe,
Option<&'a T>: RefUnwindSafe,
&'a [ValueKind<'a, T, B>]: RefUnwindSafe,
impl<'a, T, B> Send for ValueKind<'a, T, B>
impl<'a, T, B> Sync for ValueKind<'a, T, B>
impl<'a, T, B> Unpin for ValueKind<'a, T, B>
impl<'a, T, B> UnsafeUnpin for ValueKind<'a, T, B>where
Option<&'a Id<T, B>>: UnsafeUnpin,
Option<&'a T>: UnsafeUnpin,
&'a [ValueKind<'a, T, B>]: UnsafeUnpin,
impl<'a, T, B> UnwindSafe for ValueKind<'a, T, B>where
Option<&'a Id<T, B>>: UnwindSafe,
Option<&'a T>: UnwindSafe,
&'a [ValueKind<'a, T, 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.