Skip to main content

encode_with_loader

Function encode_with_loader 

Source
pub fn encode_with_loader<F>(
    jsonld_document: &Value,
    options: EncodeOptions<'_>,
    document_loader: F,
) -> Result<Vec<u8>>
where F: FnMut(&str) -> Result<Value>,
Expand description

Encodes a JSON-LD document as CBOR-LD with a document loader.

The loader receives a context URL and must return the loaded JSON-LD document as a Value containing an @context entry.