pub async fn expand_iri_with<'a, N, L, W>(
env: Environment<'a, N, L, W>,
active_context: &'a mut Context<N::Iri, N::BlankId>,
value: Nullable<ExpandableRef<'a>>,
document_relative: bool,
vocab: Option<Action>,
local_context: &'a Merged<'a>,
defined: &'a mut DefinedTerms,
remote_contexts: ProcessingStack<N::Iri>,
options: Options,
) -> ExpandIriResult<N::Iri, N::BlankId, L::Error>where
N: VocabularyMut,
N::Iri: Clone + Eq + Hash,
N::BlankId: Clone + PartialEq,
L: Loader,
W: WarningHandler<N>,Expand description
Runs the IRI expansion algorithm on value, defining terms of
local_context on demand.
Used while a context is still being processed, which is why it can recurse
into define: expanding a term may require first defining
that term, or the prefix of a compact IRI, from the context currently being
built. defined guards that recursion against cycles.
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.
A value that resolves to nothing usable is returned as an invalid identifier and reported through the warning handler, rather than failing.
§Errors
Returns an error when a term definition needed for the expansion is invalid, or when loading a remote context fails.