pub fn expand_iri_simple<W, N, L, H>(
env: &mut Environment<'_, N, L, H>,
active_context: &Context<N::Iri, N::BlankId>,
value: Nullable<ExpandableRef<'_>>,
document_relative: bool,
vocab: Option<Action>,
) -> IriExpansionResult<N>Expand description
Expands value into an IRI using only the term definitions active_context
already has.
The loader-free counterpart of expand_iri_with: it never creates a term
definition on demand, so it can only be used once the enclosing context has
been processed, or for values that cannot introduce a dependency (@vocab,
@index, a relative-IRI term).
document_relative allows a value that is otherwise unresolvable to be
resolved against the active context’s base IRI. vocab enables expansion
through the vocabulary mapping and selects what to do when that is the only
thing that would make the value expand; None disables it entirely.
Results are memoized per active context for the dominant call shape — a
string value with vocab: Some(Action::Keep) and document_relative off —
which is what makes repeated keys across the nodes of a document cheap.
§Errors
Returns an error when the value cannot be expanded into an IRI with the definitions already in the active context.