Skip to main content

resolve_link

Function resolve_link 

Source
pub fn resolve_link(
    source: LinkSource<'_>,
    link: &str,
    host: &dyn LinkHost,
    use_: LinkUse,
) -> LinkTarget
Expand description

Resolve link written in source (Sections 9.3–9.6).

Host targets outside the host’s trust boundary are UnresolvedReason::Denied whether or not they exist, so a link can’t probe for files. Embeds that leave an archive are denied unless the host enables LinkHost::load_outside_resources. Nothing is ever loaded from the network: a link with a URL scheme is LinkTarget::Url.