Skip to main content

load_bytes_with_resource_root

Function load_bytes_with_resource_root 

Source
pub fn load_bytes_with_resource_root(
    path: &Path,
    bytes: &[u8],
    resource_root: &Path,
) -> Result<Document, LoadError>
Expand description

Load captured bytes with an explicit trusted local root for external resources.

The root is capability input from the caller; it is never retained in raw facts, the dependency closure, diagnostics for source-controlled locators, or its digest.

ยงErrors

Returns LoadError under the same conditions as load_bytes, while allowing safe external resources to resolve under resource_root.