pub struct ValueHint<'a, T, B> {
pub kind: ValueKind<'a, T, B>,
pub indexed: bool,
}Expand description
Describes a value to IRI compaction without materializing it.
IRI compaction picks the term for a property by looking at the value that
will be written under it: its kind (node, value, list or graph object),
its @type, @language and @direction, its @id and whether it has an
@index. compact_iri_with reads all of that
off an expanded Indexed object; compact_iri_with_hint reads it off
this hint instead, so a caller walking its own data model can select terms
without first building jsonld-core objects.
A hint selects exactly the term the described object would select: both entry points derive the container list and the type/language preference of term selection through the same code.
Fields§
§kind: ValueKind<'a, T, B>Kind of the described value.
indexed: boolWhether the described value carries an @index entry.
Implementations§
Trait Implementations§
impl<'a, T, B> Copy for ValueHint<'a, T, B>
Auto Trait Implementations§
impl<'a, T, B> Freeze for ValueHint<'a, T, B>
impl<'a, T, B> RefUnwindSafe for ValueHint<'a, T, B>where
ValueKind<'a, T, B>: RefUnwindSafe,
impl<'a, T, B> Send for ValueHint<'a, T, B>
impl<'a, T, B> Sync for ValueHint<'a, T, B>
impl<'a, T, B> Unpin for ValueHint<'a, T, B>
impl<'a, T, B> UnsafeUnpin for ValueHint<'a, T, B>where
ValueKind<'a, T, B>: UnsafeUnpin,
impl<'a, T, B> UnwindSafe for ValueHint<'a, T, B>where
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.