Skip to main content

resolve

Function resolve 

Source
pub async fn resolve<F, Fut, E>(
    registry: &Registry,
    document: &Value,
    limits: Limits,
    load: F,
) -> Result<Option<Registry>, Error>
where F: FnMut(String) -> Fut, Fut: Future<Output = Result<String, E>>, E: Display,
Expand description

registry with every context document names that it does not hold, each loaded with load (the body fetch would return): what a Linked Data Signature on document has to be checked over. None when registry already holds every one, so a caller keeps using the registry, and any cache, it already has.

A context a loaded one names is loaded too. Every load counts against Limits::max_remote, and all of them together against Limits::timeout.

ยงErrors

When a context cannot be loaded or is not a context, when there are more than the limits allow, or when the document cannot be expanded.