pub fn compact_iri_with<N, O>(
vocabulary: &N,
active_context: &Context<N::Iri, N::BlankId>,
var: &Term<N::Iri, N::BlankId>,
value: &Indexed<O>,
vocab: bool,
reverse: bool,
options: Options,
) -> Result<Option<Arc<str>>, IriConfusedWithPrefix>Expand description
Compacts var into the term best suited to holding value.
Runs the IRI compaction algorithm with a value, so that
term selection may prefer a term whose container, type or language
mapping matches value. This is how a property is compacted for each of
its values; vocab is then true. Unlike compact_iri, the result is
not memoized.
compact_iri_with_hint selects the same term from a ValueHint
describing the value instead of the value itself.
ยงErrors
Returns IriConfusedWithPrefix when var can only be written out in
full and would then be read back as a compact IRI.